public class StateManager
extends java.lang.Object
StateIO
Type | Property and Description |
---|---|
javafx.beans.property.ObjectProperty<StateManager.PersistenceMode> |
persistenceMode |
javafx.beans.property.ObjectProperty<StateIO> |
stateIO |
Modifier and Type | Class and Description |
---|---|
static class |
StateManager.PersistenceMode
The
StateManager may operate in one of two persistence modes. |
Constructor and Description |
---|
StateManager()
Creates a new StateManager instance - this should not be called by users,
and instead should be left to Particle to manage.
|
Modifier and Type | Method and Description |
---|---|
void |
dispose()
This method is called on application shutdown so that the system state can be
flushed and disposed appropriately.
|
StateManager.PersistenceMode |
getPersistenceMode()
Gets the value of the property persistenceMode.
|
java.util.Optional<java.lang.Object> |
getProperty(java.lang.Object key)
Returns an Optional that may contain a value represented by the given key.
|
java.util.Optional<java.lang.Boolean> |
getPropertyAsBoolean(java.lang.Object key)
Returns an
Optional<Boolean> that may contain a value represented by the given key. |
java.util.Optional<java.lang.Double> |
getPropertyAsDouble(java.lang.Object key)
Returns an
Optional<Double> that may contain a value represented by the given key. |
java.util.Optional<java.lang.Integer> |
getPropertyAsInteger(java.lang.Object key)
Returns an
Optional<Integer> that may contain a value represented by the given key. |
java.util.Optional<java.lang.String> |
getPropertyAsString(java.lang.Object key)
Returns an
Optional<String> that may contain a value represented by the given key. |
StateIO |
getStateIO()
Gets the value of the property stateIO.
|
void |
init()
This method is called on application startup so that the system state can be
correctly initialised.
|
javafx.beans.property.ObjectProperty<StateManager.PersistenceMode> |
persistenceModeProperty() |
void |
setPersistenceMode(StateManager.PersistenceMode value)
Sets the value of the property persistenceMode.
|
void |
setProperty(java.lang.Object key,
java.lang.Object value)
Sets the given property under the given key.
|
void |
setStateIO(StateIO value)
Sets the value of the property stateIO.
|
javafx.beans.property.ObjectProperty<StateIO> |
stateIOProperty() |
public final javafx.beans.property.ObjectProperty<StateIO> stateIOProperty
getStateIO()
,
setStateIO(StateIO)
public final javafx.beans.property.ObjectProperty<StateManager.PersistenceMode> persistenceModeProperty
public StateManager()
public final StateIO getStateIO()
public final void setStateIO(StateIO value)
public final javafx.beans.property.ObjectProperty<StateIO> stateIOProperty()
getStateIO()
,
setStateIO(StateIO)
public final StateManager.PersistenceMode getPersistenceMode()
public final void setPersistenceMode(StateManager.PersistenceMode value)
public final javafx.beans.property.ObjectProperty<StateManager.PersistenceMode> persistenceModeProperty()
public void init()
public void dispose()
public void setProperty(java.lang.Object key, java.lang.Object value)
public java.util.Optional<java.lang.Object> getProperty(java.lang.Object key)
public java.util.Optional<java.lang.String> getPropertyAsString(java.lang.Object key)
Optional<String>
that may contain a value represented by the given key.public java.util.Optional<java.lang.Double> getPropertyAsDouble(java.lang.Object key)
Optional<Double>
that may contain a value represented by the given key.public java.util.Optional<java.lang.Integer> getPropertyAsInteger(java.lang.Object key)
Optional<Integer>
that may contain a value represented by the given key.public java.util.Optional<java.lang.Boolean> getPropertyAsBoolean(java.lang.Object key)
Optional<Boolean>
that may contain a value represented by the given key.