shared
Class AttrValue

java.lang.Object
  |
  +--shared.AttrValue
Direct Known Subclasses:
NominalAttrValue, RealAttrValue

public class AttrValue
extends java.lang.Object
implements java.lang.Cloneable

The AttrValue class contains the possible values for attributes.


Field Summary
static byte boundedReal
          Value for BoundedReal attribute type.
static byte internalDisjunction
          Value for InternalDisjunction attribute type.
 int intVal
          Value for nominal and other discrete values.
static byte linearNominal
          Value for LinearNominal attribute type.
static byte nominal
          Value for Nominal attribute type.
static byte real
          Value for Real attribute type.
 double realVal
          Value for real and other continuous values.
static byte treeStructured
          Value for TreeStructured attribute type.
 byte type
          The type of attribute this AttrValue is.
static byte unknown
          Value for Unknown attribute type.
static byte userInternalDisjunction
          Value for UserInternalDisjunction attribute type.
static byte userLinearNominal
          Value for UserLinearNominal attribute type.
static byte userNominal
          Value for UserNominal attribute type.
static byte userReal
          Value for UserReal attribute type.
static byte userTreeStructured
          Value for UserTreeStructure attribute type.
 
Constructor Summary
AttrValue()
          Constructor.
AttrValue(AttrValue src)
          Copy constructor.
AttrValue(byte aType)
          Constructor.
 
Method Summary
 java.lang.String attr_type_to_string(byte attrType)
          Converts the specified AttrValue type to a String.
 java.lang.Object clone()
          Clones this AttrValue.
 void copy(AttrValue other)
          Copies information from the supplied AttrValue to this AttrValue.
 boolean equals(AttrValue a)
          Compares this AttrValue to the specified AttrValue.
 void gets(AttrValue src)
          Sets this AttrValue to the same values as the specified AttrValue.
 java.lang.String toString()
          Converts the specified AttrValue to a String.
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

intVal

public int intVal
Value for nominal and other discrete values.

realVal

public double realVal
Value for real and other continuous values.

unknown

public static final byte unknown
Value for Unknown attribute type.

real

public static final byte real
Value for Real attribute type.

boundedReal

public static final byte boundedReal
Value for BoundedReal attribute type.

nominal

public static final byte nominal
Value for Nominal attribute type.

linearNominal

public static final byte linearNominal
Value for LinearNominal attribute type.

treeStructured

public static final byte treeStructured
Value for TreeStructured attribute type.

internalDisjunction

public static final byte internalDisjunction
Value for InternalDisjunction attribute type.

userReal

public static final byte userReal
Value for UserReal attribute type.

userNominal

public static final byte userNominal
Value for UserNominal attribute type.

userLinearNominal

public static final byte userLinearNominal
Value for UserLinearNominal attribute type.

userTreeStructured

public static final byte userTreeStructured
Value for UserTreeStructure attribute type.

userInternalDisjunction

public static final byte userInternalDisjunction
Value for UserInternalDisjunction attribute type.

type

public byte type
The type of attribute this AttrValue is.
Constructor Detail

AttrValue

public AttrValue()
Constructor.

AttrValue

public AttrValue(AttrValue src)
Copy constructor.
Parameters:
src - The AttrValue to be copied.

AttrValue

public AttrValue(byte aType)
Constructor.
Parameters:
aType - The type of AttrValue this object will be.
Method Detail

clone

public java.lang.Object clone()
                       throws java.lang.CloneNotSupportedException
Clones this AttrValue.
Overrides:
clone in class java.lang.Object
Returns:
The Clone of this AttrValue.
Throws:
java.lang.CloneNotSupportedException - This exception is never thrown by this class and is only present because Java's Object class requires it.

gets

public void gets(AttrValue src)
Sets this AttrValue to the same values as the specified AttrValue.
Parameters:
src - The AttrValue containing values to be copied.

equals

public boolean equals(AttrValue a)
Compares this AttrValue to the specified AttrValue. Base class AttrValues cannot be compared. Displays an error message if attempted.
Parameters:
a - The AttrValue to be compared to.
Returns:
TRUE if equal, FALSE otherwise. Always FALSE for the AttrValue base class.

attr_type_to_string

public java.lang.String attr_type_to_string(byte attrType)
Converts the specified AttrValue type to a String.
Parameters:
attrType - The specific value to be converted to a String.
Returns:
The String representing this AttrValue.

toString

public java.lang.String toString()
Converts the specified AttrValue to a String.
Overrides:
toString in class java.lang.Object
Returns:
A String representing the value stored in this AttrValue.

copy

public void copy(AttrValue other)
Copies information from the supplied AttrValue to this AttrValue.
Parameters:
other - The AttrValue to be copied.