org.xbig.base
Class NumberPointer<T>

java.lang.Object
  extended by org.xbig.base.NativeObject
      extended by org.xbig.base.NumberPointer<T>
All Implemented Interfaces:
INativeObject
Direct Known Subclasses:
BooleanPointer, BytePointer, CharPointer, DoublePointer, FloatPointer, IntegerPointer, LongPointer, ShortPointer

public abstract class NumberPointer<T>
extends NativeObject

Native number represents pointers of native primitive numeric values. E.g int. This allows the user to work with primitive values returned in a pointer or by reference.


Field Summary
 
Fields inherited from class org.xbig.base.NativeObject
deleted, object, remote
 
Constructor Summary
NumberPointer(InstancePointer pInstance)
           
NumberPointer(InstancePointer pointer, boolean b)
           
 
Method Summary
 byte byteValue()
          Returns the value of the specified number as a byte.
abstract  double doubleValue()
          Returns the value of the specified number as a double.
abstract  float floatValue()
          Returns the value of the specified number as a float.
abstract  T get()
           
abstract  int intValue()
          Returns the value of the specified number as an int.
abstract  long longValue()
          Returns the value of the specified number as a long.
abstract  NumberPointer<T> next()
           
abstract  void set(T value)
          Sets the value of the native number
 short shortValue()
          Returns the value of the specified number as a short.
 
Methods inherited from class org.xbig.base.NativeObject
delete, disconnectFromNativeObject, equals, finalize, getInstancePointer, hashCode, setInstancePointer, setInstancePointer, setInstancePointer, toString
 
Methods inherited from class java.lang.Object
clone, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

NumberPointer

public NumberPointer(InstancePointer pInstance)

NumberPointer

public NumberPointer(InstancePointer pointer,
                     boolean b)
Method Detail

byteValue

public byte byteValue()
Returns the value of the specified number as a byte. This may involve rounding or truncation.

Returns:
the numeric value represented by this object after conversion to type byte.

doubleValue

public abstract double doubleValue()
Returns the value of the specified number as a double. This may involve rounding.

Returns:
the numeric value represented by this object after conversion to type double.

floatValue

public abstract float floatValue()
Returns the value of the specified number as a float. This may involve rounding.

Returns:
the numeric value represented by this object after conversion to type float.

get

public abstract T get()
Returns:
The value of the native number.

intValue

public abstract int intValue()
Returns the value of the specified number as an int. This may involve rounding or truncation.

Returns:
the numeric value represented by this object after conversion to type int.

longValue

public abstract long longValue()
Returns the value of the specified number as a long. This may involve rounding or truncation.

Returns:
the numeric value represented by this object after conversion to type long.

set

public abstract void set(T value)
Sets the value of the native number

Parameters:
value - the value to set.

shortValue

public short shortValue()
Returns the value of the specified number as a short. This may involve rounding or truncation.

Returns:
the numeric value represented by this object after conversion to type short.

next

public abstract NumberPointer<T> next()
Returns:
The pointer to the next number in memory.


Copyright © 2007 netAllied GmbH. All Rights Reserved.