Class Delta

  • All Implemented Interfaces:
    Serializable
    Direct Known Subclasses:
    DeltaLong

    public abstract class Delta
    extends Number
    Value holding a base value and a delta.

    This is used when the actual intent of the value is to be an incremental update to an existing value.

    Since:
    6.0
    See Also:
    Serialized Form
    • Constructor Detail

      • Delta

        public Delta()
    • Method Detail

      • getFullValue

        public abstract Number getFullValue()
        Gets the full value (base + delta) as an object.
        Returns:
        the full value
      • getDeltaValue

        public abstract Number getDeltaValue()
        Gets the delta value as an object.
        Returns:
        the delta value
      • getBase

        public abstract Number getBase()
        Gets the base value.
        Returns:
        the base value
        Since:
        8.3
      • add

        public abstract Delta add​(Delta other)
        Adds this delta to another delta.
        Parameters:
        other - the other delta
        Returns:
        the added delta
      • add

        public abstract Number add​(Number other)
        Adds this delta to a number.
        Parameters:
        other - the number
        Returns:
        the resulting number
      • equals

        public abstract boolean equals​(Object obj)
        Overrides:
        equals in class Object
      • hashCode

        public abstract int hashCode()
        Overrides:
        hashCode in class Object