01 package dk.deepthought.sidious.supportsystem;
02
03 import java.util.Collection;
04
05 /**
06 * This interface represent a state in the system.
07 * <p>
08 * Any implementation of this interface <i>must</i> be immutable.
09 *
10 * @author Deepthought
11 *
12 */
13 public interface State {
14
15 /**
16 * Calculates and returns the collective impact of applying the input
17 * <code>states</code> to the current environment.
18 *
19 * @param states
20 * the input states
21 * @return the resulting state
22 */
23 public State impact(Collection<State> states);
24
25 /**
26 * Verifies if the specified state belongs to the same state space as this.
27 * <p>
28 * Returns <code>true</code> if this state and <code>other</code> are in
29 * the same state space, <code>false</code> otherwise.
30 *
31 * @param other
32 * the other state
33 * @return <code>true</code> if in same state space, <code>false</code> otherwise.
34 */
35 public boolean sameStateSpace(State other);
36
37 /**
38 * Checks whether this state contains all state descriptors of the input state.
39 * @param state input state
40 * @return <code>true</code> if all state descriptors are included
41 */
42 public boolean partiallyEquals(State state);
43
44 }
|