FSA
Class StateSet

java.lang.Object
  |
  +--FSA.StateSet

public class StateSet
extends java.lang.Object

This class represents a set of states (S, T, etc.).


Constructor Summary
StateSet()
           
 
Method Summary
 void addState(int s)
          Adds a state to the this state set.
 boolean containsState(int s)
          Returns true if state is in this set, false otherwise.
 boolean equals(java.lang.Object obj)
          Returns true if this object is equal to some other one, false otherwise.
 int[] getStates()
          Returns states in this set as an array.
 int hashCode()
          Returns the hash code of this state set.
 FSA.StateSet intersection(FSA.StateSet S)
          Returns the intersection of this state set with another state S.
 boolean isEmpty()
          Returns true if this state set is empty, false otherwise.
 FSA.StateSet minus(FSA.StateSet S)
          Returns the set of states in this state set and not in another state S.
 int size()
          Returns the number of states in this set.
 java.lang.String toString()
          Returns a string representation of this state set.
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

StateSet

public StateSet()
Method Detail

addState

public void addState(int s)
Adds a state to the this state set.


getStates

public int[] getStates()
Returns states in this set as an array.


containsState

public boolean containsState(int s)
Returns true if state is in this set, false otherwise.


intersection

public FSA.StateSet intersection(FSA.StateSet S)
Returns the intersection of this state set with another state S.


minus

public FSA.StateSet minus(FSA.StateSet S)
Returns the set of states in this state set and not in another state S.


isEmpty

public boolean isEmpty()
Returns true if this state set is empty, false otherwise.


size

public int size()
Returns the number of states in this set.


equals

public boolean equals(java.lang.Object obj)
Returns true if this object is equal to some other one, false otherwise.

Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Returns the hash code of this state set.

Overrides:
hashCode in class java.lang.Object

toString

public java.lang.String toString()
Returns a string representation of this state set.

Overrides:
toString in class java.lang.Object