com.eaio.nativecall
Class Holder

java.lang.Object
  |
  +--com.eaio.nativecall.Holder

public class Holder
extends Object

Holder is a class that encapsulates another Object. Use this class for output parameters.

Author:
Johann Burkard

Constructor Summary
Holder(Object o)
          Constructor for Holder.
 
Method Summary
 boolean equals(Object obj)
          Returns if this Object is equal to another Object.
 Object get()
          Returns the referenced Object.
 int hashCode()
          Returns the hashCode of the encapsulated Object or Object.hashCode() if the Object is null.
 String toString()
          Returns a String representation of this Object.
 StringBuffer toStringBuffer(StringBuffer in)
          Appends a String representation of this Object to the given StringBuffer or creates a new one if none is given.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Holder

public Holder(Object o)
Constructor for Holder.

Parameters:
o - the Object to encapsulate, may be null, but cannot be of type Holder
Throws:
ClassCastException - if o is of type Holder
Method Detail

get

public final Object get()
Returns the referenced Object.

Returns:
an Object

hashCode

public int hashCode()
Returns the hashCode of the encapsulated Object or Object.hashCode() if the Object is null.

Overrides:
hashCode in class Object
Returns:
the hashCode
See Also:
Object.hashCode()

equals

public boolean equals(Object obj)
Returns if this Object is equal to another Object.

Overrides:
equals in class Object
Parameters:
obj - the other Object, may be null
Returns:
if both Objects are equal
See Also:
Object.equals(java.lang.Object)

toString

public final String toString()
Returns a String representation of this Object.

Overrides:
toString in class Object
Returns:
a String, never null
See Also:
Object.toString(), toStringBuffer(StringBuffer)

toStringBuffer

public StringBuffer toStringBuffer(StringBuffer in)
Appends a String representation of this Object to the given StringBuffer or creates a new one if none is given.

Parameters:
in - the StringBuffer to append to, may be null
Returns:
a StringBuffer, never null