org.lwjgl
Class PointerWrapperAbstract

java.lang.Object
  extended by org.lwjgl.PointerWrapperAbstract
All Implemented Interfaces:
PointerWrapper
Direct Known Subclasses:
AMDDebugOutputCallback, ARBDebugOutputCallback, CLBuildProgramCallback, CLCommandQueue, CLContext, CLContextCallback, CLDevice, CLEvent, CLEventCallback, CLKernel, CLMem, CLMemObjectDestructorCallback, CLNativeKernel, CLPlatform, CLProgram, CLSampler, GLSync

public abstract class PointerWrapperAbstract
extends java.lang.Object
implements PointerWrapper

Base PointerWrapper implementation.

Author:
Spasi

Field Summary
protected  long pointer
           
 
Constructor Summary
protected PointerWrapperAbstract(long pointer)
           
 
Method Summary
 void checkValid()
          Checks if the pointer is valid and throws an IllegalStateException if it is not.
 boolean equals(java.lang.Object o)
           
 long getPointer()
           
 int hashCode()
           
 boolean isValid()
          Returns true if this object represents a valid pointer.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

pointer

protected final long pointer
Constructor Detail

PointerWrapperAbstract

protected PointerWrapperAbstract(long pointer)
Method Detail

isValid

public boolean isValid()
Returns true if this object represents a valid pointer. The pointer might be invalid because it is NULL or because some other action has deleted the object that this pointer represents.

Returns:
true if the pointer is valid

checkValid

public final void checkValid()
Checks if the pointer is valid and throws an IllegalStateException if it is not. This method is a NO-OP, unless the org.lwjgl.util.Debug property has been set to true.


getPointer

public final long getPointer()
Specified by:
getPointer in interface PointerWrapper

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

toString

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


Copyright © 2002-2009 lwjgl.org. All Rights Reserved.