Package org.nuxeo.ecm.core.api.model
Class DeltaLong
java.lang.Object
java.lang.Number
org.nuxeo.ecm.core.api.model.Delta
org.nuxeo.ecm.core.api.model.DeltaLong
- All Implemented Interfaces:
Serializable
Value holding a base
Long
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:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionAdds this delta to a number.Adds this delta to another delta.double
boolean
float
getBase()
Gets the base value.long
getDelta()
Gets the delta value as an object.Gets the full value (base + delta) as an object.int
hashCode()
int
intValue()
long
toString()
static DeltaLong
Returns aDeltaLong
from the given base number and delta.Methods inherited from class java.lang.Number
byteValue, shortValue
-
Constructor Details
-
DeltaLong
ADeltaLong
with the given base and delta.
-
-
Method Details
-
valueOf
Returns aDeltaLong
from the given base number and delta.The base number may be a
Long
(which may be null), or aDeltaLong
. If it is aDeltaLong
then the returned value will keep its base and just add deltas.- Parameters:
base
- the base numberdelta
- the delta- Returns:
- a
DeltaLong
-
add
Description copied from class:Delta
Adds this delta to another delta. -
add
Description copied from class:Delta
Adds this delta to a number. -
getBase
Description copied from class:Delta
Gets the base value. -
getDelta
public long getDelta() -
getDeltaValue
Description copied from class:Delta
Gets the delta value as an object.- Specified by:
getDeltaValue
in classDelta
- Returns:
- the delta value
-
getFullValue
Description copied from class:Delta
Gets the full value (base + delta) as an object.- Specified by:
getFullValue
in classDelta
- Returns:
- the full value
-
longValue
public long longValue() -
intValue
public int intValue() -
floatValue
public float floatValue()- Specified by:
floatValue
in classNumber
-
doubleValue
public double doubleValue()- Specified by:
doubleValue
in classNumber
-
toString
-
equals
-
hashCode
public int hashCode()
-