|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnetkit.graph.Attribute
public abstract class Attribute
This is the abstract parent of all Attribute classes. Each Attribute object represents one field with a string name and an enumerated type. Subclasses are used to specify the specific kinds of types and any polymorphic behavior.
Attributes
,
SchemaReader
Constructor Summary | |
---|---|
protected |
Attribute(java.lang.String name,
Type type)
Subclasses should provide a public constructor that overrides this one. |
Method Summary | |
---|---|
abstract java.lang.String |
formatForOutput(double value)
Formats the supplied value from this attribute as a String for output. |
java.lang.String |
getName()
Get the name of this Attribute. |
Type |
getType()
Get the type of this Attribute. |
abstract double |
parseAndInsert(java.lang.String token)
Parses the supplied string token for insertion into this attribute and converts the token into a double value. |
java.lang.String |
toString()
Returns a String representation for this object. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
protected Attribute(java.lang.String name, Type type)
name
- a String indicating the name of this attribute.Method Detail |
---|
public abstract double parseAndInsert(java.lang.String token)
token
- the string value to parse.
java.lang.RuntimeException
- or an exception subclass if the token
cannot be parsed by the attribute subclass or some other
constraint is violated.public abstract java.lang.String formatForOutput(double value)
value
- a double to be converted into an output String.
public final java.lang.String getName()
public final Type getType()
public final java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |