com.smardec.j2native
Class Int

java.lang.Object
  |
  +--com.smardec.j2native.Argument
        |
        +--com.smardec.j2native.DelegatedArgument
              |
              +--com.smardec.j2native.Int
All Implemented Interfaces:
java.lang.Cloneable, IntegerType, NumericType

public class Int
extends DelegatedArgument
implements IntegerType

Int represents a platform-dependent signed integer value and type, so on 32-bits platform Int works as Int32.


Field Summary
 
Fields inherited from class com.smardec.j2native.Argument
JAVA_SIDE, NATIVE_SIDE
 
Constructor Summary
Int()
          Constructs a Int object with a zero value.
Int(long value)
          Constructs a Int object with a specified value.
 
Method Summary
 boolean booleanValue()
          Returns the value of the specified number as a boolean.
 byte byteValue()
          Returns the value of the specified number as a byte.
 java.lang.Object clone()
          Creates and returns a copy of this object.
 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.
 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.
 java.lang.String toString()
           
 
Methods inherited from class com.smardec.j2native.DelegatedArgument
finalize, free, fromBytesValue, getAlignedLength, getInternalValue, getLength, read, readFromRAM, readFromStack, restoreFromRAM, setInternalValue, storeToRAM, toBytesValue, toBytesValue, write, writeToRAM, writeToStack
 
Methods inherited from class com.smardec.j2native.Argument
update
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Int

public Int()
Constructs a Int object with a zero value.


Int

public Int(long value)
Constructs a Int object with a specified value.

Parameters:
value - value to set
Method Detail

setValue

public void setValue(long value)
Description copied from interface: IntegerType
Sets an integer value

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

longValue

public 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 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 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 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 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 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 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.

toString

public java.lang.String toString()
Overrides:
toString in class DelegatedArgument

clone

public java.lang.Object clone()
Description copied from class: Argument
Creates and returns a copy of this object.

Specified by:
clone in class Argument
Returns:
a clone of this instance.

isFixedLength

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

Overrides:
isFixedLength in class DelegatedArgument
Returns:
true if it is so, and false otherwise


Copyright © 2004-2005 Smardec. All Rights Reserved.