org.xbig.base
Class EnumPointer<T extends INativeEnum<T>>

java.lang.Object
  extended by org.xbig.base.NativeObject
      extended by org.xbig.base.EnumPointer<T>
All Implemented Interfaces:
INativeObject

public class EnumPointer<T extends INativeEnum<T>>
extends NativeObject

This class maintains the adress of a single integer. It makes sure that only allowed enumeration values of it's type parameter are used.


Field Summary
 
Fields inherited from class org.xbig.base.NativeObject
deleted, object, remote
 
Constructor Summary
EnumPointer(InstancePointer p, T val)
          Allows native methods to return EnumPointers.
EnumPointer(T val)
          Constructor to create an integer variable on the heap and initialise it with an allowed value.
 
Method Summary
 void delete()
          Frees the memory used by the integer value.
 void finalize()
          If a client programmer forgets to free memory there is a chance that the GC does it.
 T get()
          Returns the enumeration value.
 void set(T val)
          Sets the integer value.
 
Methods inherited from class org.xbig.base.NativeObject
disconnectFromNativeObject, equals, getInstancePointer, hashCode, setInstancePointer, setInstancePointer, setInstancePointer, toString
 
Methods inherited from class java.lang.Object
clone, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

EnumPointer

public EnumPointer(InstancePointer p,
                   T val)
Allows native methods to return EnumPointers.


EnumPointer

public EnumPointer(T val)
Constructor to create an integer variable on the heap and initialise it with an allowed value.

Method Detail

delete

public void delete()
Frees the memory used by the integer value.

Specified by:
delete in interface INativeObject
Specified by:
delete in class NativeObject
See Also:
#remote

finalize

public void finalize()
If a client programmer forgets to free memory there is a chance that the GC does it.

Overrides:
finalize in class NativeObject

set

public void set(T val)
Sets the integer value.


get

public T get()
Returns the enumeration value.



Copyright © 2007 netAllied GmbH. All Rights Reserved.