public class CompositeState extends java.lang.Object implements ComponentState
| Constructor and Description | 
|---|
| CompositeState() | 
| CompositeState(int capacity) | 
| Modifier and Type | Method and Description | 
|---|---|
| void | addComponent(java.lang.Object comp) | 
| void | addComponents(java.util.Collection<? extends java.lang.Object> comps) | 
| void | addState(ComponentState state) | 
| void | clear() | 
| CompositeState | duplicate()Create a duplicate of this state which can be used for storing this
 state's values. | 
| boolean | equals(ComponentState state)Returns true if this state equals another component state. | 
| java.util.ArrayList<java.lang.Object> | getComponents() | 
| ComponentState | getState(int i) | 
| java.util.Iterator<ComponentState> | getStates() | 
| int | numComponents() | 
| int | numSubStates() | 
| void | printState(int indent)Debugging method to print the structure of a composite state | 
| void | readBinary(java.io.DataInputStream dis)Read this state (in binary format) from a data input stream. | 
| void | removeState(ComponentState state) | 
| void | set(ComponentState stateToCopy)Sets this state by copying the value from an existing state object. | 
| void | set(CompositeState state) | 
| void | writeBinary(java.io.DataOutputStream dos)Writes this state (in binary format) to a data output stream. | 
public CompositeState()
public CompositeState(int capacity)
public java.util.Iterator<ComponentState> getStates()
public ComponentState getState(int i)
public void addComponents(java.util.Collection<? extends java.lang.Object> comps)
public void addComponent(java.lang.Object comp)
public java.util.ArrayList<java.lang.Object> getComponents()
public int numComponents()
public void addState(ComponentState state)
public void removeState(ComponentState state)
public int numSubStates()
public void clear()
public boolean equals(ComponentState state)
equals in interface ComponentStatestate - state to compare topublic void writeBinary(java.io.DataOutputStream dos)
                 throws java.io.IOException
ComponentStatewriteBinary in interface ComponentStatedos - output stream to write model tojava.io.IOException - if an I/O error occurredpublic void readBinary(java.io.DataInputStream dis)
                throws java.io.IOException
ComponentStatereadBinary in interface ComponentStatedis - input stream to read model fromjava.io.IOException - if an I/O error occurred or if the input is incompatible with the current
 state configuration.public void set(ComponentState stateToCopy)
ComponentStateset in interface ComponentStatestateToCopy - state object to copypublic void set(CompositeState state)
public CompositeState duplicate()
ComponentStateduplicate in interface ComponentStatepublic void printState(int indent)