jmarkov
Class StatesSet<Stte extends State>

java.lang.Object
  extended by jmarkov.StatesSet<Stte>

public class StatesSet<Stte extends State>
extends java.lang.Object

This class represent a set of States. It is used as a convinence to build multiple destinations in the method dest.

Author:
Germán Riaño. Universidad de los Andes.
See Also:
MarkovProcess.dests(State, Event)

Constructor Summary
StatesSet()
          Creates an empty set of States;
StatesSet(Stte s)
          Creates set of States with this State;
 
Method Summary
 boolean add(Stte s)
          Adds the State s to the set.
 boolean contains(State s)
          Returns true if the set contains this State.
 Stte[] toStateArray()
          Returns an array with the States in the set.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

StatesSet

public StatesSet()
Creates an empty set of States;


StatesSet

public StatesSet(Stte s)
Creates set of States with this State;

Parameters:
s - The state to include in the set.
Method Detail

add

public boolean add(Stte s)
Adds the State s to the set.

Parameters:
s - The State to be added.
Returns:
True if the set did not already contained this event.

contains

public boolean contains(State s)
Returns true if the set contains this State.


toStateArray

public Stte[] toStateArray()
Returns an array with the States in the set.


toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object
See Also:
Object.toString()