Package org.nuxeo.ecm.core.api.model
Class Delta
- java.lang.Object
-
- java.lang.Number
-
- org.nuxeo.ecm.core.api.model.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 Summary
Constructors Constructor Description Delta()
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description abstract Numberadd(Number other)Adds this delta to a number.abstract Deltaadd(Delta other)Adds this delta to another delta.abstract booleanequals(Object obj)abstract NumbergetBase()Gets the base value.abstract NumbergetDeltaValue()Gets the delta value as an object.abstract NumbergetFullValue()Gets the full value (base + delta) as an object.abstract inthashCode()-
Methods inherited from class java.lang.Number
byteValue, doubleValue, floatValue, intValue, longValue, shortValue
-
-
-
-
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
-
-