theseus.api
Class Attr

java.lang.Object
  |
  +--theseus.api.Attr
All Implemented Interfaces:
java.lang.Cloneable, java.io.Serializable

public final class Attr
extends java.lang.Object
implements java.lang.Cloneable, java.io.Serializable

An attribute is a name/type pair. Possible types are described in the AttrType class.

See Also:
Serialized Form

Constructor Summary
Attr(java.lang.String a_name, int a_type)
          Create attribute using name and numeric type.
Attr(java.lang.String a_name, java.lang.String a_type)
          Create attribute using name and type (ie, "name", "char").
 
Method Summary
 java.lang.Object clone()
          Deep copies the attribute.
 boolean equals(java.lang.Object a_obj)
          Checks if two attributes are equal.
 java.lang.String getName()
          Gets the name of the attribute
 int getType()
          Gets the numeric name of the attribute
 java.lang.String toString()
          Gets string form of attribute.
 
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Attr

public Attr(java.lang.String a_name,
            java.lang.String a_type)
     throws theseus.api.InvalidAttrTypeException
Create attribute using name and type (ie, "name", "char").


Attr

public Attr(java.lang.String a_name,
            int a_type)
     throws theseus.api.InvalidAttrTypeException
Create attribute using name and numeric type. Acceptable types specified in AttrType.

Method Detail

getName

public java.lang.String getName()
Gets the name of the attribute

Returns:
String

getType

public int getType()
Gets the numeric name of the attribute

Returns:
int

toString

public java.lang.String toString()
Gets string form of attribute.

Overrides:
toString in class java.lang.Object
Returns:
String

clone

public java.lang.Object clone()
Deep copies the attribute.

Overrides:
clone in class java.lang.Object
Returns:
Object

equals

public boolean equals(java.lang.Object a_obj)
Checks if two attributes are equal.

Overrides:
equals in class java.lang.Object