JHPcte
Class PcteAttributeValue

java.lang.Object
  |
  +--JHPcte.PcteAttributeValue
Direct Known Subclasses:
PcteMutableAttributeValue

public class PcteAttributeValue
extends java.lang.Object

The value of a Pcte attribute. The value type can be queried and the value can be accessed accordingly. If possible, values are converted according to the value type requested (e.g. int -> String)


Field Summary
static int PCTE_BOOLEAN_ATTRIBUTE
           
static int PCTE_ENUMERATION_ATTRIBUTE
           
static int PCTE_FLOAT_ATTRIBUTE
           
static int PCTE_INTEGER_ATTRIBUTE
           
static int PCTE_NATURAL_ATTRIBUTE
           
static int PCTE_STRING_ATTRIBUTE
           
static int PCTE_TIME_ATTRIBUTE
           
protected  java.lang.String value
           
protected  int valueType
           
 
Constructor Summary
PcteAttributeValue(boolean b)
          constructor for boolean attribute values
PcteAttributeValue(float f)
          constructor for float attribute values
PcteAttributeValue(int i)
          constructor for integer attribute values
PcteAttributeValue(int i, int type)
          constructor for integer/natural/time/enumeration attribute values the valueType has to be set explicitly using the type parameter
PcteAttributeValue(java.lang.String s)
          constructor for string attribute values
PcteAttributeValue(java.lang.String s, int type)
          value type has to be set explicitly using the type parameter
 
Method Summary
 boolean getBooleanValue()
          returns the attribute's value as a boolean
 int getEnumerationValue()
          returns the attribute's value as an enumeration string
 float getFloatValue()
          returns the attribute's value as a float
 int getIntValue()
          returns the attribute's value as an integer
 int getNaturalValue()
          returns the attribute's value as a natural (equals integer)
 java.lang.String getStringValue()
          returns the attribute's value as a string
 int getTimeValue()
          returns the attribute's value as an int value
 int getValueType()
          returns the attribute value's type (e.g.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

PCTE_BOOLEAN_ATTRIBUTE

public static final int PCTE_BOOLEAN_ATTRIBUTE

PCTE_INTEGER_ATTRIBUTE

public static final int PCTE_INTEGER_ATTRIBUTE

PCTE_NATURAL_ATTRIBUTE

public static final int PCTE_NATURAL_ATTRIBUTE

PCTE_FLOAT_ATTRIBUTE

public static final int PCTE_FLOAT_ATTRIBUTE

PCTE_STRING_ATTRIBUTE

public static final int PCTE_STRING_ATTRIBUTE

PCTE_TIME_ATTRIBUTE

public static final int PCTE_TIME_ATTRIBUTE

PCTE_ENUMERATION_ATTRIBUTE

public static final int PCTE_ENUMERATION_ATTRIBUTE

valueType

protected int valueType

value

protected java.lang.String value
Constructor Detail

PcteAttributeValue

public PcteAttributeValue(boolean b)
constructor for boolean attribute values

PcteAttributeValue

public PcteAttributeValue(int i)
constructor for integer attribute values

PcteAttributeValue

public PcteAttributeValue(int i,
                          int type)
constructor for integer/natural/time/enumeration attribute values the valueType has to be set explicitly using the type parameter

PcteAttributeValue

public PcteAttributeValue(java.lang.String s,
                          int type)
value type has to be set explicitly using the type parameter

PcteAttributeValue

public PcteAttributeValue(float f)
constructor for float attribute values

PcteAttributeValue

public PcteAttributeValue(java.lang.String s)
constructor for string attribute values
Method Detail

getValueType

public int getValueType()
returns the attribute value's type (e.g. PCTE_INTEGER_ATTRIBUTE)

getBooleanValue

public boolean getBooleanValue()
returns the attribute's value as a boolean

getIntValue

public int getIntValue()
returns the attribute's value as an integer

getNaturalValue

public int getNaturalValue()
returns the attribute's value as a natural (equals integer)

getFloatValue

public float getFloatValue()
returns the attribute's value as a float

getStringValue

public java.lang.String getStringValue()
returns the attribute's value as a string

getTimeValue

public int getTimeValue()
returns the attribute's value as an int value

getEnumerationValue

public int getEnumerationValue()
returns the attribute's value as an enumeration string

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object