stella
Interface Trigger

All Superinterfaces:
Initializable, Parameter, PropertyBearing
All Known Subinterfaces:
Switch, WeatherSurveying
All Known Implementing Classes:
AbstractRemoteSwitch, AbstractRemoteTrigger, AbstractSwitch, AbstractTrigger, AbstractWeatherSurveyor, Blinker, CabinetSwitch, CountDownTrigger, CountingTrigger, DeviceTrigger, ErrorTrigger, FlatMatch, FocusStar, HumiditySwitch, InferPark, JFrameParameter, JSliderParameter, LightSwitch, MissmatchTrigger, MomentsTrigger, Observing, OneReadTrigger, OneWireMultiSwitch, OneWireSwitch, PilarTrigger, PowerTelescope, RoofTrigger, RS485Switch, SeasonWeather, ShelterTrigger, SimpleEventTrigger, SimpleRemoteSwitch, SimpleRemoteTrigger, SimpleTrigger, SimulatorWeather, SwitchSkeleton, SwitchStub, SwitchTrigger, TriggerSkeleton, TriggerStub, WeatherStation, WeatherTrigger, WeatherTrigger

public interface Trigger
extends Parameter

A convenience interface useful for parameters that return Boolean instances at their Parameter.get() method. This interface defines additional methods that allow direct access to this Boolean without further casting.

See Also:
Value

Field Summary
 
Fields inherited from interface util.PropertyBearing
CONFIG, KEY_CLASS, KEY_URLRESOURCES, KEY_URLUSECONFIG, KEY_URLUSECURRENT, KEY_URLUSEHOME
 
Method Summary
 long getElapsedToggleTime()
          Returns the elapsed time from the last toggle event on the trigger until now.
 Date getLastToggleTime()
          Returns the date of the last toggle event on this trigger.
 Boolean getTrigger()
          Returns the same value as Parameter.get() but already cast into a boolean.
 boolean isTrue()
          Returns the value of the trigger as a boolean primitive.
 Boolean setTrigger(Boolean to)
          Does the same thing as Parameter.set(java.lang.Object) but returns the old value as a boolean.
 Boolean toggleTrigger()
          Toggles the value of this trigger.
 
Methods inherited from interface stella.Parameter
get, getFormatted, getName, getString, set
 
Methods inherited from interface util.PropertyBearing
defaultBoolean, defaultChar, defaultDouble, defaultFloat, defaultInt, defaultLong, defaultObject, defaultObject, defaultProperties, defaultProperty, getAsBoolean, getAsChar, getAsDouble, getAsFloat, getAsInt, getAsList, getAsLong, getAsMap, getAsObject, getAsObject, getLocalized, getProperties, getProperty, getResource, getResourceAsStream, getResources, has, parseObject, removeProperty, setObject, setProperty, stringProperties
 
Methods inherited from interface util.Initializable
init
 

Method Detail

getTrigger

Boolean getTrigger()
Returns the same value as Parameter.get() but already cast into a boolean.


isTrue

boolean isTrue()
Returns the value of the trigger as a boolean primitive.


setTrigger

Boolean setTrigger(Boolean to)
                   throws UnsupportedOperationException
Does the same thing as Parameter.set(java.lang.Object) but returns the old value as a boolean.

Throws:
UnsupportedOperationException

toggleTrigger

Boolean toggleTrigger()
                      throws UnsupportedOperationException
Toggles the value of this trigger. This method does not have a Parameter counterpart. The return value is the old value of the trigger.

Throws:
UnsupportedOperationException

getLastToggleTime

Date getLastToggleTime()
Returns the date of the last toggle event on this trigger.


getElapsedToggleTime

long getElapsedToggleTime()
Returns the elapsed time from the last toggle event on the trigger until now. The returned time is a time in ms, passed over as a long.