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

io.ebean.ValuePair Maven / Gradle / Ivy

There is a newer version: 15.8.0
Show newest version
package io.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;
  }

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy