Class Int64Value
- java.lang.Object
-
- com.smartgridready.communicator.common.api.values.Value
-
- com.smartgridready.communicator.common.api.values.NumberValue<java.lang.Long>
-
- com.smartgridready.communicator.common.api.values.Int64Value
-
public class Int64Value extends NumberValue<java.lang.Long>
Implements an SGr value containing a 64-bit signed integer value.
-
-
Field Summary
-
Fields inherited from class com.smartgridready.communicator.common.api.values.NumberValue
value
-
Fields inherited from class com.smartgridready.communicator.common.api.values.Value
UNSIGNED_LONG_MASK
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidabsValue()Sets the instance's value to its absolute value, if possible.Int64Value[]asArray()Gets the value as array.static Int64Valueof(long value)Creates a new instance from long.voidroundToInt()Rounds the instance's value to the nearest integer, if possible.protected voidsetValue(double value)Updates the numeric value.-
Methods inherited from class com.smartgridready.communicator.common.api.values.NumberValue
equals, getBitmap, getBoolean, getDateTime, getEnum, getFloat32, getFloat64, getInt16, getInt16U, getInt32, getInt32U, getInt64, getInt64U, getInt8, getInt8U, getJson, getString, hashCode, scaleDown, scaleUp, toString
-
Methods inherited from class com.smartgridready.communicator.common.api.values.Value
enumToOrdinalValue, fromDiscreteInput, fromModbusRegister, fromString, getJson, toModbusDiscreteVal, toModbusRegister
-
-
-
-
Method Detail
-
setValue
protected void setValue(double value)
Description copied from class:NumberValueUpdates the numeric value.- Specified by:
setValuein classNumberValue<java.lang.Long>- Parameters:
value- a double value
-
asArray
public Int64Value[] asArray()
Description copied from class:ValueGets the value as array.
-
absValue
public void absValue()
Description copied from class:ValueSets the instance's value to its absolute value, if possible.
-
roundToInt
public void roundToInt()
Description copied from class:ValueRounds the instance's value to the nearest integer, if possible.- Specified by:
roundToIntin classValue
-
of
public static Int64Value of(long value)
Creates a new instance from long.- Parameters:
value- the long value- Returns:
- an instance of
Int64Value
-
-