Home about services products contact login
   com.smardec

J2Native

  j2native
com.smardec.j2native
Class IntegerArgument

java.lang.Object
|
+--com.smardec.j2native.Argument
|
+--com.smardec.j2native.NumericArgument
|
+--com.smardec.j2native.IntegerArgument
All Implemented Interfaces:
java.lang.Cloneable, IntegerType, NumericType
Direct Known Subclasses:
Int16, Int32, Int64, Int8, UInt16, UInt32, UInt8

public abstract class IntegerArgument
extends NumericArgument
implements IntegerType

IntegerArgument is a base class for all integer types.


Field Summary
Fields inherited from class com.smardec.j2native.Argument
JAVA_SIDE, NATIVE_SIDE
Constructor Summary
protected IntegerArgument(long value)
Constructs an integer object with a specified value
Method Summary
protected void bits2Value(long bits)
Sets the value by its bit representation.
boolean booleanValue()
Returns the value of the specified number as a boolean.
byte byteValue()
Returns the value of the specified number as a byte.
double doubleValue()
Returns the value of the specified number as a double.
float floatValue()
Returns the value of the specified number as a float.
int intValue()
Returns the value of the specified number as an int.
protected boolean isFixedLength()
Identify if Argument is a fixed length variable.
boolean isFloat()
Shows if number is of floating-point type
long longValue()
Returns the value of the specified number as a long.
void setValue(long value)
Sets an integer value
short shortValue()
Returns the value of the specified number as a short.
protected long value2Bits()
Returns the value as bit representation.
Methods inherited from class com.smardec.j2native.NumericArgument
fromBytesValue, isSigned, read, readFromStack, toBytesValue, toBytesValue, write, writeToStack
Methods inherited from class com.smardec.j2native.Argument
clone, finalize, free, getAlignedLength, getLength, getResultFlags, readFromRAM, restoreFromRAM, storeToRAM, update, writeToRAM
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail
IntegerArgument
protected IntegerArgument(long value)

Constructs an integer object with a specified value

Parameters:
value - value to set
Method Detail
setValue
public final void setValue(long value)
Description copied from interface: IntegerType
Sets an integer value

Specified by:
setValue in interface IntegerType
Parameters:
value - integer value

isFloat
public final boolean isFloat()
Description copied from class: NumericArgument
Shows if number is of floating-point type

Specified by:
isFloat in class NumericArgument

longValue
public final long longValue()
Description copied from interface: NumericType
Returns the value of the specified number as a long. This may involve rounding or truncation.

Specified by:
longValue in interface NumericType
Returns:
the numeric value represented by this object after conversion to type long.

intValue
public final int intValue()
Description copied from interface: NumericType
Returns the value of the specified number as an int. This may involve rounding or truncation.

Specified by:
intValue in interface NumericType
Returns:
the numeric value represented by this object after conversion to type int.

shortValue
public final short shortValue()
Description copied from interface: NumericType
Returns the value of the specified number as a short. This may involve rounding or truncation.

Specified by:
shortValue in interface NumericType
Returns:
the numeric value represented by this object after conversion to type short.

byteValue
public final byte byteValue()
Description copied from interface: NumericType
Returns the value of the specified number as a byte. This may involve rounding or truncation.

Specified by:
byteValue in interface NumericType
Returns:
the numeric value represented by this object after conversion to type byte.

booleanValue
public final boolean booleanValue()
Description copied from interface: NumericType
Returns the value of the specified number as a boolean. This may involve rounding or truncation.

Specified by:
booleanValue in interface NumericType
Returns:
the numeric value represented by this object after conversion to type boolean.

floatValue
public final float floatValue()
Description copied from interface: NumericType
Returns the value of the specified number as a float. This may involve rounding.

Specified by:
floatValue in interface NumericType
Returns:
the numeric value represented by this object after conversion to type float.

doubleValue
public final double doubleValue()
Description copied from interface: NumericType
Returns the value of the specified number as a double. This may involve rounding.

Specified by:
doubleValue in interface NumericType
Returns:
the numeric value represented by this object after conversion to type double.

value2Bits
protected long value2Bits()
Description copied from class: NumericArgument
Returns the value as bit representation.

Specified by:
value2Bits in class NumericArgument
Returns:
the numeric value represented by this object as bit representation.

bits2Value
protected void bits2Value(long bits)
Description copied from class: NumericArgument
Sets the value by its bit representation.

Specified by:
bits2Value in class NumericArgument
Parameters:
bits - value as bit representation

isFixedLength
protected boolean isFixedLength()
Description copied from class: Argument
Identify if Argument is a fixed length variable.

Specified by:
isFixedLength in class Argument
Returns:
true if it is so, and false otherwise
Home about services products contact login