Module ilusr.textadventurelib
Package textadventurelib.persistence
Class CompletionTimerPersistenceObject
- java.lang.Object
-
- ilusr.persistencelib.configuration.XmlConfigurationObject
-
- textadventurelib.persistence.TimerPersistenceObject
-
- textadventurelib.persistence.CompletionTimerPersistenceObject
-
- All Implemented Interfaces:
ilusr.persistencelib.configuration.IXmlConfigurationObject
,ilusr.persistencelib.configuration.PersistXml
public class CompletionTimerPersistenceObject extends TimerPersistenceObject
- Author:
- Jeff Riggle
Creates xml in the following format:
<Timer type="Completion"> <Duration>Time until timer fires</Duration> <CompletionData>Data to complete with</CompletionData> </Timer>
-
-
Constructor Summary
Constructors Constructor Description CompletionTimerPersistenceObject()
Ctor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <T> T
completionData()
<T> void
completionData(T data)
void
convertFromPersistence(ilusr.persistencelib.configuration.XmlConfigurationObject obj)
TimerHelper
convertToTimer()
void
prepareXml()
Prepares the xml to be saved.-
Methods inherited from class textadventurelib.persistence.TimerPersistenceObject
duration, duration, type, type
-
Methods inherited from class ilusr.persistencelib.configuration.XmlConfigurationObject
addChild, addChildren, addConfigurationProperties, addConfigurationProperty, children, clearChildren, clearConfigurationProperties, configurationProperties, getChildObject, getChildValue, getValueType, load, name, name, persist, removeChild, removeChildren, removeConfigurationProperties, removeConfigurationProperty, value, value
-
-
-
-
Constructor Detail
-
CompletionTimerPersistenceObject
public CompletionTimerPersistenceObject() throws TransformerConfigurationException, ParserConfigurationException
Ctor.
-
-
Method Detail
-
completionData
public <T> void completionData(T data)
- Parameters:
data
- The new data to complete with for this timer.
-
completionData
public <T> T completionData()
-
prepareXml
public void prepareXml()
Description copied from class:TimerPersistenceObject
Prepares the xml to be saved. This must be called before saving the Xml!- Overrides:
prepareXml
in classTimerPersistenceObject
-
convertToTimer
public TimerHelper convertToTimer()
- Specified by:
convertToTimer
in classTimerPersistenceObject
-
convertFromPersistence
public void convertFromPersistence(ilusr.persistencelib.configuration.XmlConfigurationObject obj)
-
-