org.x4juli.global.constants
Class ConstantBigInteger

java.lang.Object
  extended byorg.x4juli.global.constants.ConstantBigInteger
All Implemented Interfaces:
Constant, java.io.Serializable

public class ConstantBigInteger
extends java.lang.Object
implements Constant

Constant super class for BigInteger values.

Since:
0.5
Author:
Boris Unckel
See Also:
Serialized Form

Field Summary
private static java.util.Map CONSTANTS_MASTER_INDEX
          Holds the grand constants index map.
private static long serialVersionUID
           
private  java.math.BigInteger value
          Holds value of property value.
 
Fields inherited from interface org.x4juli.global.constants.Constant
ERR_DUP_NAME
 
Constructor Summary
protected ConstantBigInteger(java.math.BigInteger value)
          Creates a new instance of ConstantObject.
 
Method Summary
 java.lang.Object getValue()
          Object way to access the value.
 java.math.BigInteger getValueAsObject()
          Getter for property value.
 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 ConstantBigInteger lookup(java.lang.Class dataType, java.math.BigInteger value)
          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

serialVersionUID

private static final long serialVersionUID
See Also:
Constant Field Values

CONSTANTS_MASTER_INDEX

private static final java.util.Map CONSTANTS_MASTER_INDEX
Holds the grand constants index map. Contains references to all constants indexes that are instantiated indexed by constant value.


value

private final java.math.BigInteger value
Holds value of property value.

Constructor Detail

ConstantBigInteger

protected ConstantBigInteger(java.math.BigInteger value)
Creates a new instance of ConstantObject.

Parameters:
value - The value for the constant object.
Throws:
java.lang.NullPointerException - If null is given for the constant value.
java.lang.IllegalArgumentException - If the user passes a null value.
Method Detail

lookup

public static final ConstantBigInteger lookup(java.lang.Class dataType,
                                              java.math.BigInteger value)
Get the constant for the given class and id.

Parameters:
dataType - The class for which to retrieve the index.
value - The value of the constant.
Returns:
The constant object for the given class and value.
Since:
0.5

lookup

public static final java.util.Map lookup(java.lang.Class dataType)
Get the constants index for the given class.

Parameters:
dataType - The class for which to retrieve the index.
Returns:
An unmodifiable map of constants for the given class.
Since:
0.5

getValue

public java.lang.Object getValue()
Object way to access the value.

Specified by:
getValue in interface Constant
Returns:
the value of the constant as java.lang.Object
Since:
0.5

getValueType

public java.lang.Class getValueType()
Determine the type.

Specified by:
getValueType in interface Constant
Returns:
the type of the constant as Class
Since:
0.5

getValueAsString

public java.lang.String getValueAsString()
Return the plain value as String. getValueAsString differs from toString():
getValueAsString is just the plain value without technical content.

Specified by:
getValueAsString in interface Constant
Returns:
the value of the constant as java.lang.String
Since:
0.5

getValueAsObject

public final java.math.BigInteger getValueAsObject()
Getter for property value.

Returns:
Value of property value.
Since:
0.5

toString

public java.lang.String toString()

Since:
0.5

readResolve

protected java.lang.Object readResolve()
                                throws java.io.ObjectStreamException
Resolve a read in object.

Returns:
The resolved object read in.
Throws:
java.io.ObjectStreamException - if there is a problem reading the object.
java.lang.RuntimeException - If the read object doesnt exist.
Since:
0.5


${license_html}