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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionAdds this delta to a number.Adds this delta to another delta.doublebooleanfloatgetBase()Gets the base value.longgetDelta()Gets the delta value as an object.Gets the full value (base + delta) as an object.inthashCode()intintValue()longtoString()static DeltaLongReturns aDeltaLongfrom the given base number and delta.Methods inherited from class java.lang.Number
byteValue, shortValue
-
Constructor Details
-
DeltaLong
ADeltaLongwith the given base and delta.
-
-
Method Details
-
valueOf
Returns aDeltaLongfrom the given base number and delta.The base number may be a
Long(which may be null), or aDeltaLong. If it is aDeltaLongthen 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:DeltaAdds this delta to another delta. -
add
Description copied from class:DeltaAdds this delta to a number. -
getBase
Description copied from class:DeltaGets the base value. -
getDelta
public long getDelta() -
getDeltaValue
Description copied from class:DeltaGets the delta value as an object.- Specified by:
getDeltaValuein classDelta- Returns:
- the delta value
-
getFullValue
Description copied from class:DeltaGets the full value (base + delta) as an object.- Specified by:
getFullValuein classDelta- Returns:
- the full value
-
longValue
public long longValue() -
intValue
public int intValue() -
floatValue
public float floatValue()- Specified by:
floatValuein classNumber
-
doubleValue
public double doubleValue()- Specified by:
doubleValuein classNumber
-
toString
-
equals
-
hashCode
public int hashCode()
-