|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjmarkov.basic.StatesSet<S>
S - The States class for the states in this set.public class StatesSet<S extends State>
This class represent a set of States. It is used as a convinence to
build multiple destinations in the method reachable.
DTMDP.reachable(State, Action),
CTMDP.reachable(State, Action)| Constructor Summary | |
|---|---|
StatesSet()
Creates an empty set of States; |
|
StatesSet(java.lang.Iterable<S> states)
Creates a set of objects S from the given States |
|
StatesSet(S s)
Creates set of States with only this State; |
|
StatesSet(S[] states)
Creates a set of objects S from a given set of States |
|
StatesSet(States<S> states)
Creates a set of objects S from the given States |
|
| Method Summary | |
|---|---|
boolean |
add(java.lang.Iterable<S> states)
Adds the States in the iterator to the set. |
boolean |
add(S s)
Adds the State s to the set. |
boolean |
add(States<S> states)
Adds the States in the iterator to the set. |
boolean |
contains(S s)
Returns true if the set contains this State. |
S |
get(S state)
Returns the element that is equal (according to equals() ) to the given element. |
boolean |
isClosed()
The set is closed if all elements have been added. |
java.util.Iterator<S> |
iterator()
This method returns a safe way to walk through the states in a particular set. |
int |
numerateStates()
This method numerates all states and returns the number of states found. |
boolean |
remove(S s)
Removes an object from the set. |
int |
size()
Returns the number of elements. |
S[] |
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 |
|---|
public StatesSet()
public StatesSet(S s)
s - The state to include in the set.public StatesSet(java.lang.Iterable<S> states)
states - a set of States of type States.public StatesSet(S[] states)
states - a set of States of type States.public StatesSet(States<S> states)
states - a set of States of type States.| 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 boolean add(S s)
s - The State to be added.
public boolean add(java.lang.Iterable<S> states)
states - a set of States of type States.
public boolean add(States<S> states)
states - a set of States of type States.
public S get(S state)
state - The given state
public boolean remove(S s)
s - The element to remove.
public boolean contains(S s)
s - A State
public int numerateStates()
numerateStates in interface States<S extends State>public S[] toStateArray()
public int size()
States
size in interface States<S extends State>public java.lang.String toString()
toString in class java.lang.Objectpublic boolean isClosed()
States
isClosed in interface States<S extends State>
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||