public class IntegerItem extends Object implements NumberItem<Long>
Modifier and Type | Method and Description |
---|---|
Long |
get() |
long |
getAsLong() |
int |
getDivisor()
Returns the divisor to be used to obtain the actual numerical value (as
opposed to the underlying long value returned by
LongSupplier.getAsLong() ). |
Parameters |
getParams()
Get the
Parameters of this Item . |
String |
serialize()
Serialize.
|
StringBuilder |
serializeTo(StringBuilder sb)
Serialize to an existing
StringBuilder . |
static IntegerItem |
valueOf(long value)
Creates an
IntegerItem instance representing the specified
long value. |
IntegerItem |
withParams(Parameters params)
Given an existing
Item , return a new instance with the specified
Parameters . |
public static IntegerItem valueOf(long value)
IntegerItem
instance representing the specified
long
value.value
- a long
value.IntegerItem
representing value
.public IntegerItem withParams(Parameters params)
Parametrizable
Item
, return a new instance with the specified
Parameters
.withParams
in interface Item<Long>
withParams
in interface NumberItem<Long>
withParams
in interface Parametrizable<Long>
params
- Parameters
to set (must be non-null)Parameters
.public Parameters getParams()
Parametrizable
Parameters
of this Item
.getParams
in interface Parametrizable<Long>
public StringBuilder serializeTo(StringBuilder sb)
Type
StringBuilder
.serializeTo
in interface Type<Long>
sb
- where to serialize toStringBuilder
so calls can be chained.public long getAsLong()
getAsLong
in interface LongSupplier
public int getDivisor()
NumberItem
LongSupplier.getAsLong()
).getDivisor
in interface NumberItem<Long>
1
for Integers, 1000
for Decimals)Copyright © 2021 The Apache Software Foundation. All rights reserved.