All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.avaje.ebean.ValuePair Maven / Gradle / Ivy

There is a newer version: 8.1.1
Show newest version
package com.avaje.ebean;

/**
 * Holds two values as the result of a difference comparison.
 */
public class ValuePair {

  protected Object newValue;

  protected Object oldValue;

  /**
   * Default constructor for JSON tools.
   */
  public ValuePair() {
  }

  /**
   * Construct with the pair of new and old values.
   */
  public ValuePair(Object newValue, Object oldValue) {
    this.newValue = newValue;
    this.oldValue = oldValue;
  }

  /**
   * Return the new value.
   */
  public Object getNewValue() {
    return newValue;
  }
  
  /**
   * Return the old value.
   */
  public Object getOldValue() {
    return oldValue;
  }

  /**
   * Set the new value.
   */
  public void setNewValue(Object newValue) {
    this.newValue = newValue;
  }

  /**
   * Set the old value.
   */
  public void setOldValue(Object oldValue) {
    this.oldValue = oldValue;
  }

  public String toString() {
    return newValue + "," + oldValue;
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy