jmdp.basic
Interface States<S extends State>

All Superinterfaces:
java.lang.Iterable<S>
All Known Implementing Classes:
StatesSet

public interface States<S extends State>
extends java.lang.Iterable<S>

This interface represents a set of objects State. The user must choose his own data structure and define the constuctors. It is recommended to use the Set structure to avoid repeated states.

Author:
Andres Sarmiento and German Riano - Universidad de Los Andes

Method Summary
 void add(S s)
          This method adds an object to the set of states.
 java.util.Iterator<S> iterator()
          This function must be implemented.
 void remove(S s)
          Removes an object from the set.
 int size()
          Returns the number of elements.
 

Method Detail

iterator

java.util.Iterator<S> iterator()
This function must be implemented. Must return an iterator over the states.

Specified by:
iterator in interface java.lang.Iterable<S extends State>

add

void add(S s)
This method adds an object to the set of states.

Parameters:
s - object to be added.

remove

void remove(S s)
Removes an object from the set.


size

int size()
Returns the number of elements.

Returns:
the number of State elements.