A
- format of data used by the ModeManager
this ModeSetting
is associated withpublic interface ModeSetting<A>
Mode
but are stored independent
from that mode. Each of the read/write methods gets access to the ModeSettingsConverter
that is
used by the ModeSettings
to store data in memory. The methods are not required to use the converter,
but the implementation may be easier when using the converters read/write methods as well.Modifier and Type | Method and Description |
---|---|
Path |
getModeId()
Gets the unique identifier of the
Mode this setting is
associated with. |
<B> void |
read(DataInputStream in,
ModeSettingsConverter<A,B> converter)
Reads the contents of this setting from
in . |
<B> void |
read(XElement element,
ModeSettingsConverter<A,B> converter)
Reads the contents of this setting from
element . |
<B> void |
write(DataOutputStream out,
ModeSettingsConverter<A,B> converter)
Writes the contents of this setting into
out . |
<B> void |
write(XElement element,
ModeSettingsConverter<A,B> converter)
Writes the contents of this setting into
element . |
Path getModeId()
Mode
this setting is
associated with.<B> void write(DataOutputStream out, ModeSettingsConverter<A,B> converter) throws IOException
out
.out
- the stream to write intoconverter
- converts data to and from persistent storageIOException
- in case of an error<B> void read(DataInputStream in, ModeSettingsConverter<A,B> converter) throws IOException
in
.in
- the stream to read fromconverter
- converts data to and from persistent storageIOException
- in case of an error<B> void write(XElement element, ModeSettingsConverter<A,B> converter)
element
. This
method should add children to element
, but not change
the attributes of element
.element
- the item to write intoconverter
- converts data to and from persistent storage<B> void read(XElement element, ModeSettingsConverter<A,B> converter)
element
.element
- the item to read fromconverter
- converts data to and from persistent storage