artisynth.core.modelbase
Interface ComponentState

All Superinterfaces:
java.io.Serializable
All Known Implementing Classes:
CompositeState, EmptyState, FemModelState, MechModelState, NumericState

public interface ComponentState
extends java.io.Serializable

Object containing state information for an Artisynth model or component.


Method Summary
 ComponentState 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.
 void readBinary(java.io.DataInputStream dis)
          Read this state (in binary format) from a data input stream.
 void set(ComponentState state)
          Sets this state by copying the value from an existing state object.
 void writeBinary(java.io.DataOutputStream dos)
          Writes this state (in binary format) to a data output stream.
 

Method Detail

writeBinary

void writeBinary(java.io.DataOutputStream dos)
                 throws java.io.IOException
Writes this state (in binary format) to a data output stream.

Parameters:
dos - output stream to write model to
Throws:
java.io.IOException - if an I/O error occurred

readBinary

void readBinary(java.io.DataInputStream dis)
                throws java.io.IOException
Read this state (in binary format) from a data input stream.

Parameters:
dis - input stream to read model from
Throws:
java.io.IOException - if an I/O error occurred or if the input is incompatible with the current state configuration.

set

void set(ComponentState state)
Sets this state by copying the value from an existing state object.

Parameters:
state - state object to copy
Throws:
java.lang.IllegalArgumentException - if the state objects are incompatible

equals

boolean equals(ComponentState state)
Returns true if this state equals another component state.

Parameters:
state - state to compare to

duplicate

ComponentState duplicate()
Create a duplicate of this state which can be used for storing this state's values.

Returns:
duplicate of this state