public interface ComponentState extends java.io.Serializable, Scannable
Modifier and Type | Method and Description |
---|---|
ComponentState |
duplicate()
Create a duplicate of this state which can be used for storing this
state's values.
|
default boolean |
equals(ComponentState state)
Returns true if this state equals another component state.
|
boolean |
equals(ComponentState state,
java.lang.StringBuilder msg)
Returns true if this state equals another component state.
|
default boolean |
isAnnotated()
Queries whether or not this state is annotated.
|
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.
|
default void |
setAnnotated(boolean annotated)
Requests that this state be annotated.
|
void |
writeBinary(java.io.DataOutputStream dos)
Writes this state (in binary format) to a data output stream.
|
isWritable, scan, write
void writeBinary(java.io.DataOutputStream dos) throws java.io.IOException
dos
- output stream to write model tojava.io.IOException
- if an I/O error occurredvoid readBinary(java.io.DataInputStream dis) throws java.io.IOException
dis
- 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.void set(ComponentState state)
state
- state object to copyjava.lang.IllegalArgumentException
- if the state objects are incompatibledefault boolean equals(ComponentState state)
state
- state to compare toboolean equals(ComponentState state, java.lang.StringBuilder msg)
state
- state to compare tomsg
- If not null
, can be used to append diagnostic
information if the states are not equal.default boolean isAnnotated()
msg
argument to
equals(state,msg)
.true
if this state is annotated.default void setAnnotated(boolean annotated)
isAnnotated()
for more details.
Support for this method is optional. Applications should
check isAnnotated()
to determine if the request has been
honored.
annotated
- if true
, requests that this state be annotated.ComponentState duplicate()