public class DeltaLong extends Delta
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.
Constructor and Description |
---|
DeltaLong(long base,
long delta)
Deprecated.
since 8.3, use
DeltaLong(Long, long) instead. |
DeltaLong(Long base,
long delta)
A
DeltaLong with the given base and delta. |
Modifier and Type | Method and Description |
---|---|
Delta |
add(Delta other)
Adds this delta to another delta.
|
Number |
add(Number other)
Adds this delta to a number.
|
static DeltaLong |
deltaOrLong(Number base,
long delta)
Deprecated.
since 8.3, use
valueOf(Number, long) instead. |
double |
doubleValue() |
boolean |
equals(Object obj) |
float |
floatValue() |
Long |
getBase()
Gets the base value.
|
long |
getDelta() |
Long |
getDeltaValue()
Gets the delta value as an object.
|
Long |
getFullValue()
Gets the full value (base + delta) as an object.
|
int |
hashCode() |
int |
intValue() |
long |
longValue() |
String |
toString() |
static DeltaLong |
valueOf(Number base,
long delta)
Returns a
DeltaLong from the given base number and delta. |
byteValue, shortValue
@Deprecated public DeltaLong(long base, long delta)
DeltaLong(Long, long)
instead.DeltaLong
with the given base and delta.public static DeltaLong valueOf(Number base, long delta)
DeltaLong
from the given base number and delta.
The base number may be a Long
(which may be null), or a DeltaLong
. If it is a DeltaLong
then the returned value will keep its base and just add deltas.
base
- the base numberdelta
- the deltaDeltaLong
@Deprecated public static DeltaLong deltaOrLong(Number base, long delta)
valueOf(Number, long)
instead.DeltaLong
from the given base number and delta.
The base number may be a Long
(which may be null), or a DeltaLong
. If it is a DeltaLong
then the returned value will keep its base and just add deltas.
base
- the base numberdelta
- the deltaDeltaLong
public Delta add(Delta other)
Delta
public Number add(Number other)
Delta
public long getDelta()
public Long getDeltaValue()
Delta
getDeltaValue
in class Delta
public Long getFullValue()
Delta
getFullValue
in class Delta
public float floatValue()
floatValue
in class Number
public double doubleValue()
doubleValue
in class Number
Copyright © 2018 Nuxeo. All rights reserved.