|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.x4juli.global.constants.ConstantLong
Constant super class for Long values.
| Field Summary | |
private static java.util.Map |
CONSTANTS_MASTER_INDEX
Holds the grand constants index map. |
private static long |
serialVersionUID
|
private java.lang.Long |
value
Holds value of property value. |
| Fields inherited from interface org.x4juli.global.constants.Constant |
ERR_DUP_NAME |
| Constructor Summary | |
protected |
ConstantLong(long key)
Creates a new instance of ConstantObject. |
protected |
ConstantLong(java.lang.Long value)
Creates a new instance of ConstantObject. |
| Method Summary | |
java.lang.Object |
getValue()
Object way to access the value. |
java.lang.Long |
getValueAsObject()
Getter for property value. |
long |
getValueAsPrimitive()
Returns the value as primitive type. |
java.lang.String |
getValueAsString()
Return the plain value as String. getValueAsString differs from toString():
getValueAsString
is just the plain value without technical content. |
java.lang.Class |
getValueType()
Determine the type. |
static java.util.Map |
lookup(java.lang.Class dataType)
Get the constants index for the given class. |
static ConstantLong |
lookup(java.lang.Class dataType,
long value)
Get the constant for the given class and id. |
static ConstantLong |
lookup(java.lang.Class dataType,
java.lang.Long key)
Get the constant for the given class and id. |
protected java.lang.Object |
readResolve()
Resolve a read in object. |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
private static final long serialVersionUID
private static final java.util.Map CONSTANTS_MASTER_INDEX
private final java.lang.Long value
| Constructor Detail |
protected ConstantLong(java.lang.Long value)
value - The value for the constant object.
java.lang.NullPointerException - If null is given for the constant value.
java.lang.IllegalArgumentException - If the user passes a null value.protected ConstantLong(long key)
key - The value for the constant object.
java.lang.IllegalArgumentException - If the user passes a null value.| Method Detail |
public static final ConstantLong lookup(java.lang.Class dataType,
java.lang.Long key)
dataType - The class for which to retrieve the index.key - The value of the constant.
public static final ConstantLong lookup(java.lang.Class dataType,
long value)
dataType - The class for which to retrieve the index.value - The value of the constant.
public static final java.util.Map lookup(java.lang.Class dataType)
dataType - The class for which to retrieve the index.
public final java.lang.Class getValueType()
getValueType in interface Constantpublic final java.lang.Object getValue()
getValue in interface Constantpublic final java.lang.String getValueAsString()
getValueAsString differs from toString():
getValueAsString
is just the plain value without technical content.
getValueAsString in interface Constantpublic final long getValueAsPrimitive()
public final java.lang.Long getValueAsObject()
public java.lang.String toString()
protected java.lang.Object readResolve()
throws java.io.ObjectStreamException
java.io.ObjectStreamException - if there is a problem reading the object.
java.lang.RuntimeException - If the read object doesnt exist.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||