|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--javautils.holders.AbstractHolder
A base class for holders providing default implementations of equals(java.lang.Object)
, hashCode()
and toString()
-methods.
Note: The derived holder class is assumed to contain a public
field named value
.
Constructor Summary | |
AbstractHolder()
|
Method Summary | |
boolean |
equals(java.lang.Object other)
|
protected java.lang.Object |
get()
Gets the value of the value -field of this object. |
int |
hashCode()
|
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public AbstractHolder()
Method Detail |
protected java.lang.Object get()
Gets the value of the value
-field of this object. You
can override this method in the derived class to improve performance,
but it is not strictly necessary.
Node: This method is not intended for public use.
The whole idea is that concrete holders publicly reveal their
value
-field for ease of use.
public boolean equals(java.lang.Object other)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |