|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjmdp.basic.StatesSet<S>
public class StatesSet<S extends State>
This class represents a set of states represented by objects of type S that extends State.
Collection
Constructor Summary | |
---|---|
StatesSet()
Creates an empty set of objects S. |
|
StatesSet(java.lang.Iterable<S> stIter)
|
|
StatesSet(S st)
Creates a set of States with only one State in it. |
|
StatesSet(S[] st)
Creates a set of States from a given array of States. |
|
StatesSet(States<S> st)
Creates a set of objects S from a given set of States |
Method Summary | |
---|---|
void |
add(S s)
Adds a state to the set. |
java.util.Iterator<S> |
iterator()
This method returns a safe way to walk through the states in a particular set. |
void |
remove(S s)
Removes an object from the set. |
int |
size()
Returns the number of elements. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public StatesSet()
public StatesSet(States<S> st)
st
- a set of States of type States.public StatesSet(java.lang.Iterable<S> stIter)
public StatesSet(S st)
st
- set of states of type State.public StatesSet(S[] st)
st
- array of states of type State.Method Detail |
---|
public final java.util.Iterator<S> iterator()
iterator
in interface java.lang.Iterable<S extends State>
iterator
in interface States<S extends State>
public void add(S s)
add
in interface States<S extends State>
s
- state to be added.public void remove(S s)
remove
in interface States<S extends State>
public int size()
States
size
in interface States<S extends State>
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |