netkit.graph
Class FixedTokenSet

java.lang.Object
  extended by netkit.graph.TokenSet
      extended by netkit.graph.FixedTokenSet

public final class FixedTokenSet
extends TokenSet

This class keeps track of valid tokens for a CATEGORICAL attribute type. A token is valid if it exists in this container and all tokens must be provided at the time of construction. This class is immutable.

Author:
Kaveh R. Ghazi
See Also:
AttributeFixedCategorical

Field Summary
 
Fields inherited from class netkit.graph.TokenSet
tokenList, tokenMap
 
Constructor Summary
FixedTokenSet(java.lang.String[] tarray)
          This constructor takes a String array of valid tokens; the tokens supplied to the constructor are the only valid ones for the lifetime of this token set.
 
Method Summary
 
Methods inherited from class netkit.graph.TokenSet
add, contains, getToken, getTokens, getValue, size
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FixedTokenSet

public FixedTokenSet(java.lang.String[] tarray)
This constructor takes a String array of valid tokens; the tokens supplied to the constructor are the only valid ones for the lifetime of this token set.

Parameters:
tarray - an array of String representing the valid tokens.
Throws:
java.lang.RuntimeException - if any of the tokens is duplicated.