public class EmptyState extends java.lang.Object implements ComponentState
| Constructor and Description |
|---|
EmptyState() |
| Modifier and Type | Method and Description |
|---|---|
ComponentState |
duplicate()
Create a duplicate of this state which can be used for storing this
state's values.
|
boolean |
equals(ComponentState state,
java.lang.StringBuilder msg)
Returns true if this state equals another component state.
|
boolean |
isWritable()
Returns
true if this component should in fact be written to
secondary storage. |
void |
readBinary(java.io.DataInputStream dis)
Read this state (in binary format) from a data input stream.
|
void |
scan(ReaderTokenizer rtok,
java.lang.Object ref)
Scans this element from a ReaderTokenizer.
|
void |
set(ComponentState state)
Sets this state by copying the value from an existing state object.
|
void |
write(java.io.PrintWriter pw,
NumberFormat fmt,
java.lang.Object ref)
Writes a text description of this element to a PrintWriter.
|
void |
writeBinary(java.io.DataOutputStream dos)
Writes this state (in binary format) to a data output stream.
|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitequals, isAnnotated, setAnnotatedpublic void writeBinary(java.io.DataOutputStream dos)
throws java.io.IOException
writeBinary 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
readBinary 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 write(java.io.PrintWriter pw,
NumberFormat fmt,
java.lang.Object ref)
throws java.io.IOException
Scannablescan and complete
enough to allow full reconstruction of the element.public void scan(ReaderTokenizer rtok, java.lang.Object ref) throws java.io.IOException
Scannablewrite.public boolean isWritable()
Scannabletrue if this component should in fact be written to
secondary storage. This gives subclasses control over whether or
not they are actually written out.isWritable in interface Scannabletrue if this component should be written to
secondary storage.public void set(ComponentState state)
set in interface ComponentStatestate - state object to copyjava.lang.IllegalArgumentException - if the state objects are incompatiblepublic boolean equals(ComponentState state, java.lang.StringBuilder msg)
ComponentStateequals in interface ComponentStatestate - state to compare tomsg - If not null, can be used to append diagnostic
information if the states are not equal.public ComponentState duplicate()
duplicate in interface ComponentState