|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnetkit.graph.Attribute
netkit.graph.AttributeCategorical
netkit.graph.AttributeFixedCategorical
public final class AttributeFixedCategorical
This class handles attributes that are of type CATEGORICAL. CATEGORICAL types can have values from a set of tokens specified by the tokenSet. The set of valid tokens is fixed at the time this container is created. This class is immutable.
Attributes,
FixedTokenSet,
SchemaReader| Field Summary |
|---|
| Fields inherited from class netkit.graph.AttributeCategorical |
|---|
tokenSet |
| Constructor Summary | |
|---|---|
AttributeFixedCategorical(java.lang.String name,
FixedTokenSet tokenSet)
The constructor must be provided the name of this attribute and the set of valid categorical token values. |
|
| Method Summary | |
|---|---|
double |
parseAndInsert(java.lang.String token)
Parses the supplied string token for insertion into this attribute and converts the token into a double value; if the token is "?", that results in NaN. |
| Methods inherited from class netkit.graph.AttributeCategorical |
|---|
formatForOutput, getToken, getTokens, getValue, size |
| Methods inherited from class netkit.graph.Attribute |
|---|
getName, getType, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public AttributeFixedCategorical(java.lang.String name,
FixedTokenSet tokenSet)
name - a String representing the name of this attribute.tokenSet - a set representing the valid categorical token
values for this attribute.| Method Detail |
|---|
public double parseAndInsert(java.lang.String token)
parseAndInsert in class Attributetoken - the string value to parse.
java.lang.RuntimeException - if the token is not already in the set
of valid tokens.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||