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
public class DeltaLong extends Delta
Value holding a baseLongvalue 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 DeltaLong(long base, long delta)Deprecated.since 8.3, useDeltaLong(Long, long)instead.DeltaLong(Long base, long delta)ADeltaLongwith the given base and delta.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description Numberadd(Number other)Adds this delta to a number.Deltaadd(Delta other)Adds this delta to another delta.static DeltaLongdeltaOrLong(Number base, long delta)Deprecated.since 8.3, usevalueOf(Number, long)instead.doubledoubleValue()booleanequals(Object obj)floatfloatValue()LonggetBase()Gets the base value.longgetDelta()LonggetDeltaValue()Gets the delta value as an object.LonggetFullValue()Gets the full value (base + delta) as an object.inthashCode()intintValue()longlongValue()StringtoString()static DeltaLongvalueOf(Number base, long delta)Returns aDeltaLongfrom the given base number and delta.-
Methods inherited from class java.lang.Number
byteValue, shortValue
-
-
-
-
Constructor Detail
-
DeltaLong
@Deprecated public DeltaLong(long base, long delta)
Deprecated.since 8.3, useDeltaLong(Long, long)instead.ADeltaLongwith the given base and delta.
-
-
Method Detail
-
valueOf
public static DeltaLong valueOf(Number base, long delta)
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
-
deltaOrLong
@Deprecated public static DeltaLong deltaOrLong(Number base, long delta)
Deprecated.since 8.3, usevalueOf(Number, long)instead.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
public Delta add(Delta other)
Description copied from class:DeltaAdds this delta to another delta.
-
add
public Number add(Number other)
Description copied from class:DeltaAdds this delta to a number.
-
getDelta
public long getDelta()
-
getDeltaValue
public Long getDeltaValue()
Description copied from class:DeltaGets the delta value as an object.- Specified by:
getDeltaValuein classDelta- Returns:
- the delta value
-
getFullValue
public Long getFullValue()
Description copied from class:DeltaGets the full value (base + delta) as an object.- Specified by:
getFullValuein classDelta- Returns:
- the full value
-
floatValue
public float floatValue()
- Specified by:
floatValuein classNumber
-
doubleValue
public double doubleValue()
- Specified by:
doubleValuein classNumber
-
-