public class SimpleTrigger extends AbstractTrigger implements Reloadable
AbstractTrigger.set(java.lang.Object) method can be retrieved later with the AbstractTrigger.get() method.
The only difference to the abstract trigger base class is that this class
is not abstract and provides two public constructors.PropertyResources.Load, PropertyResources.URLResource| Modifier and Type | Field and Description |
|---|---|
static String |
KEY_INITBOOLEAN
The key for initializing the simple trigger to the given value.
|
private Date |
toggle
The date of the last toggle event on the trigger.
|
private Boolean |
val
The value of the paramter.
|
KEY_FORMAT, KEY_NAME, KEY_PRESERVE, UNKNOWNKEY_NOINITONCREATE, POSTFIX_ALPHABET, POSTFIX_BYTES, POSTFIX_DIR, POSTFIX_EXT, POSTFIX_FILE, POSTFIX_LIST, POSTFIX_MODTIME, POSTFIX_URLKEY_LISTSEPARATOR, KEY_MAPKEYVALUECHAR, KEY_MAPSEPARATORCONFIG, KEY_CLASSKEY_URLRESOURCES, KEY_URLUSECONFIG, KEY_URLUSECURRENT, KEY_URLUSEHOME| Constructor and Description |
|---|
SimpleTrigger()
Constructs a simple parameter without any properteis.
|
SimpleTrigger(boolean startval)
Constructs a simple trigger without parameters and set to the
startup value.
|
SimpleTrigger(Map prop)
Constructs a simple parameter without any specific need for the
properties argument.
|
| Modifier and Type | Method and Description |
|---|---|
Date |
getLastToggleTime()
Returns the time of the last toggle event as a date.
|
Boolean |
getTrigger()
Gets the value of this parameter.
|
void |
init()
Initializes this simple trigger and sets it to its initial state if the
KEY_INITBOOLEAN property is set. |
double |
rescanned(String key,
String old,
String newval)
Makes this method public and allows setting of the initial value of the
trigger, if this is still null.
|
Boolean |
setTrigger(Boolean newval)
Sets the value of this parameter.
|
get, getElapsedToggleTime, isTrue, set, toggleTriggercreateParameter, delivers, exit, getFormatted, getFormatted, getName, getPreserveFile, getString, getString, overrideDefaultName, register, setName, toStringclone, createFrom, createFrom, createFrom, createInstance, getApplet, getAsResources, getLocate, getPropertiesToKey, getPropertiesToKey, getResource, getResourceAsStream, getResourceFromKey, getResources, hasLocalURLs, initProperties, keyCreate, keyCreate, reload, setAppletaugment, augment, augment, augment, augment, defaultBoolean, defaultChar, defaultDouble, defaultFloat, defaultInt, defaultLong, defaultObject, defaultObject, defaultProperties, defaultProperty, getAsBoolean, getAsChar, getAsDouble, getAsEnums, getAsFloat, getAsInt, getAsList, getAsLong, getAsMap, getAsMap, getAsObject, getAsObject, getProperties, getProperty, has, isNew, parseObject, parseObject, reload, removeProperty, requires, setObject, setProperties, setProperty, stringPropertiesequals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitreloadgetFormatted, getName, getStringdefaultBoolean, defaultChar, defaultDouble, defaultFloat, defaultInt, defaultLong, defaultObject, defaultObject, defaultProperties, defaultProperty, getAsBoolean, getAsChar, getAsDouble, getAsFloat, getAsInt, getAsList, getAsLong, getAsMap, getAsObject, getAsObject, getProperties, getProperty, has, parseObject, removeProperty, setObject, setProperty, stringPropertiespublic static final String KEY_INITBOOLEAN
private Boolean val
private Date toggle
public SimpleTrigger()
public SimpleTrigger(boolean startval)
throws InitException
InitExceptionpublic SimpleTrigger(Map prop)
public void init()
throws InitException
KEY_INITBOOLEAN property is set.init in interface Initializableinit in class AbstractParameterInitExceptionpublic double rescanned(String key, String old, String newval)
rescanned in interface Reloadablerescanned in class AbstractParameterpublic Boolean getTrigger()
getTrigger in interface Triggeringpublic Boolean setTrigger(Boolean newval)
setTrigger in interface Triggeringpublic Date getLastToggleTime()
getLastToggleTime in interface Triggering