BASIC - the basic typepublic abstract class AbstractWrapper<BASIC> extends java.lang.Object implements Wrapper<BASIC>
Wrapper interface .| Modifier and Type | Field and Description |
|---|---|
protected java.lang.Class<BASIC> |
basicClass |
protected BASIC |
value |
| Modifier | Constructor and Description |
|---|---|
protected |
AbstractWrapper(java.lang.Class<BASIC> basicClass) |
protected |
AbstractWrapper(java.lang.Class<BASIC> basicClass,
BASIC value) |
| Modifier and Type | Method and Description |
|---|---|
protected BASIC |
doGet() |
protected BASIC |
doGetCopy() |
protected boolean |
doHasEqualValue(java.lang.Object otherValue) |
protected void |
doSet(BASIC value) |
BASIC |
get()
Returns the value.
|
java.lang.Class<BASIC> |
getBasicClass()
Returns the class of the basic type.
|
BASIC |
getCopy()
Return a copy of the value.
|
BASIC |
getDefault()
Returns the default value.
|
boolean |
hasEqualValue(java.lang.Object otherValue)
Whether this object has an equal value to the other one.
|
void |
set(BASIC value)
Sets the value.
|
java.lang.String |
toString() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitaccept, isPrimitiveWrapperprotected final java.lang.Class<BASIC> basicClass
protected BASIC value
protected AbstractWrapper(java.lang.Class<BASIC> basicClass)
protected void doSet(BASIC value)
public final BASIC get()
WrapperThe value may be null.
protected BASIC doGet()
public final BASIC getCopy()
Wrapperprotected BASIC doGetCopy()
public BASIC getDefault()
WrappergetDefault in interface Wrapper<BASIC>nullpublic final boolean hasEqualValue(java.lang.Object otherValue)
WrapperhasEqualValue in interface Wrapper<BASIC>otherValue - the other objecttrue if this object has an equal value to the other one.protected boolean doHasEqualValue(java.lang.Object otherValue)
public java.lang.Class<BASIC> getBasicClass()
WrappergetBasicClass in interface Wrapper<BASIC>public java.lang.String toString()
toString in class java.lang.Object