pal.misc
Class Attribute

java.lang.Object
  extended bypal.misc.Attribute

public class Attribute
extends java.lang.Object

An immutable attribute has a name and value. A convenience constructor for conversion from string to types Boolean, Integer, Double, Float is available.


Field Summary
static java.lang.String BOOLEAN
           
static java.lang.String DOUBLE
           
static java.lang.String FLOAT
           
static java.lang.String INTEGER
           
static java.lang.String STRING
           
 
Constructor Summary
Attribute(java.lang.String name, java.lang.Object value)
           
Attribute(java.lang.String name, java.lang.String val, java.lang.String type)
           
 
Method Summary
 java.lang.String getName()
           
 java.lang.Object getValue()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

STRING

public static final java.lang.String STRING
See Also:
Constant Field Values

INTEGER

public static final java.lang.String INTEGER
See Also:
Constant Field Values

BOOLEAN

public static final java.lang.String BOOLEAN
See Also:
Constant Field Values

DOUBLE

public static final java.lang.String DOUBLE
See Also:
Constant Field Values

FLOAT

public static final java.lang.String FLOAT
See Also:
Constant Field Values
Constructor Detail

Attribute

public Attribute(java.lang.String name,
                 java.lang.String val,
                 java.lang.String type)
Parameters:
name - the name of the attribute.
val - the value as a string
type - a string description of the type the value is. One of 'boolean', 'integer', 'double', 'float', 'string'

Attribute

public Attribute(java.lang.String name,
                 java.lang.Object value)
Method Detail

getName

public java.lang.String getName()

getValue

public java.lang.Object getValue()