Class Decimal
java.lang.Object
java.lang.Number
se.kuseman.payloadbuilder.api.execution.Decimal
- All Implemented Interfaces:
Serializable,Comparable<Decimal>,ValueVector
Wrapper class for data type
Column.Type.Decimal.- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface se.kuseman.payloadbuilder.api.execution.ValueVector
ValueVector.LiteralValueVector -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intNOTE! PLB doesn't have support for specifying scaling of decimals (unless created with String/BigDecinal), scale is set to this in factory methodsFields inherited from interface se.kuseman.payloadbuilder.api.execution.ValueVector
EMPTY_VECTOR_BY_TYPE, FALSE_VECTORS, ONE_SIZE_NULL_VECTOR_BY_TYPE, TRUE_VECTORS -
Method Summary
Modifier and TypeMethodDescriptionabs()Return the absolute value of this decimalConvert this value as aBigDecimalceiling()Return ceiling value of this decimalintdoublebooleanfloatfloor()Return floor value of this decimalstatic Decimalfrom(double value) Construct a deciaml from provided doublestatic Decimalfrom(float value) Construct a deciaml from provided floatstatic Decimalfrom(int value) Construct a deciaml from provided intstatic Decimalfrom(long value) Construct a deciaml from provided longstatic DecimalConstruct a deciaml from provided object.getDecimal(int row) Get decimal value for provided rowinthashCode()intintValue()booleanisNull(int row) Return if value at provided row is nulllongnegate()Negate this decimal returning a new instanceprocessArithmetic(Decimal other, IArithmeticBinaryExpression.Type type) Process provided deicmal to this instance with provided arithmetic type.intsize()Return size of vectortoString()type()Return type of vector valuesMethods inherited from class java.lang.Number
byteValue, shortValueMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface se.kuseman.payloadbuilder.api.execution.ValueVector
getAny, getArray, getBoolean, getCardinality, getDateTime, getDateTimeOffset, getDouble, getFloat, getInt, getLong, getObject, getPredicateBoolean, getString, getTable, toCsv, toCsv, valueAsObject, valueAsString
-
Field Details
-
SCALE
public static final int SCALENOTE! PLB doesn't have support for specifying scaling of decimals (unless created with String/BigDecinal), scale is set to this in factory methods- See Also:
-
-
Method Details
-
size
public int size()Description copied from interface:ValueVectorReturn size of vector- Specified by:
sizein interfaceValueVector
-
type
Description copied from interface:ValueVectorReturn type of vector values- Specified by:
typein interfaceValueVector
-
isNull
public boolean isNull(int row) Description copied from interface:ValueVectorReturn if value at provided row is null- Specified by:
isNullin interfaceValueVector
-
getDecimal
Description copied from interface:ValueVectorGet decimal value for provided row- Specified by:
getDecimalin interfaceValueVector
-
processArithmetic
Process provided deicmal to this instance with provided arithmetic type. Returns a newDecimal -
negate
Negate this decimal returning a new instance -
asBigDecimal
Convert this value as aBigDecimal -
abs
Return the absolute value of this decimal -
ceiling
Return ceiling value of this decimal -
floor
Return floor value of this decimal -
intValue
public int intValue() -
longValue
public long longValue() -
floatValue
public float floatValue()- Specified by:
floatValuein classNumber
-
doubleValue
public double doubleValue()- Specified by:
doubleValuein classNumber
-
compareTo
- Specified by:
compareToin interfaceComparable<Decimal>
-
hashCode
public int hashCode() -
equals
-
toString
-
from
Construct a deciaml from provided object. Tries to convert known types like BigDecimal/Strings etc. -
from
Construct a deciaml from provided int -
from
Construct a deciaml from provided long -
from
Construct a deciaml from provided float -
from
Construct a deciaml from provided double
-