Class AlarmEventInstance

    • Constructor Detail

      • AlarmEventInstance

        public AlarmEventInstance​(AlarmEvent core)
      • AlarmEventInstance

        public AlarmEventInstance​(AlarmEvent core,
                                  AlarmStateTransition transition)
        Convenience constructor for branching on new state transition *
    • Method Detail

      • getLastEventState

        public AlarmStateTransition getLastEventState()
        Description copied from interface: AlarmEvent
        Returns the most recent transition, or if this event represents a single state, the particular state that it represents.
        Specified by:
        getLastEventState in interface AlarmEvent
      • iterator

        public java.util.Iterator<PropertyValue> iterator()
        Specified by:
        iterator in interface java.lang.Iterable<PropertyValue>
      • setGlobal

        public <T> void setGlobal​(Property<T> p,
                                  T value)
      • getOrElse

        public <T> T getOrElse​(Property<T> property,
                               T value)
        Description copied from interface: PropertyValueSource
        Get the value for a given Property, or else fall back to value if it's not present.
        Specified by:
        getOrElse in interface PropertyValueSource
        property - The Property for which a value is to be retrieved.
        value - The value to default to if property isn't present.
        The value of property if present, value if not. Can return null if the value is null.
      • getValues

        public java.util.List<PropertyValue> getValues()
        Description copied from interface: PropertyValueSource
        Returns the opaque PropertyValue objects. This can be useful when you want to avoid the strict type checking of the value, and it's important to note that if the property is bound, the value will be a BoundValue. Be very careful about overriding, and make sure to maintain the methodology of using getProperties to iterate and get (or getOrDefault), to get the value, because those are all handled differently by BoundPropertySets, ExtendedPropertySets, etc.
        Specified by:
        getValues in interface PropertyValueSource
      • getId

        public java.util.UUID getId()
        Description copied from interface: AlarmEvent
        The unique id for this event. Generated when the alarm is first generated, and then maintained for the life of the alarm event cycle.
        Specified by:
        getId in interface AlarmEvent
      • isExtended

        public boolean isExtended​(Property<?> prop)
        Description copied from interface: PropertySet
        Returns whether this property set contains a value for the prop, and the prop was actually inherited. In other words, this is true if the property is inherited, and an override value is present.
        Specified by:
        isExtended in interface PropertySet
      • isInherited

        public boolean isInherited​(Property<?> prop)
        Description copied from interface: PropertySet
        Indicates whether the property was inherited from a parent type.
        Specified by:
        isInherited in interface PropertySet
      • getName

        public java.lang.String getName()
        Specified by:
        getName in interface AlarmEvent
      • getLabel

        public java.lang.String getLabel()
        Description copied from interface: AlarmEvent
        Returns the "Label" property, or "Name" if not defined.
        Specified by:
        getLabel in interface AlarmEvent
      • isShelved

        public boolean isShelved()
        Description copied from interface: AlarmEvent
        Returns whether this is event is currently shelved, if the ShelfExpiration property is set, or whether the event was shelved, for journaled events, based on whether the IsShelved property is set.
        Specified by:
        isShelved in interface AlarmEvent
      • getState

        public AlarmState getState()
        Description copied from interface: AlarmEvent
        Returns the current state, as an enum. If this event represents a single state, such as the result from a journal query, this value will be misleading. In that case, getLastEventState() is the more accurate state function to use.
        Specified by:
        getState in interface AlarmEvent
      • toString

        public java.lang.String toString()
        toString in class java.lang.Object
      • getNotes

        public java.lang.String getNotes()
        Specified by:
        getNotes in interface AlarmEvent