public class IntersectedAlarmDefinition extends java.lang.Object implements AlarmDefinition
Constructor and Description |
---|
IntersectedAlarmDefinition(java.util.List<AlarmDefinition> alarms) |
Modifier and Type | Method and Description |
---|---|
boolean |
contains(Property<?> prop) |
<T> T |
get(Property<T> prop)
Retrieves the value of the property, or null if this set doesn't contain that property.
|
BoundAlarmProperty |
getBoundProperty(Property<?> property) |
int |
getCount()
The number of properties contained in this PropertySet
|
java.lang.String |
getName() |
<T> T |
getOrDefault(Property<T> prop) |
<T> T |
getOrElse(Property<T> property,
T value)
Get the value for a given
Property , or else fall back to value if it's not present. |
java.util.Collection<Property<?>> |
getProperties() |
java.util.List<PropertyValue> |
getValues() |
boolean |
isExtended(Property<?> prop)
Returns whether this property set contains a value for the prop, and the prop was actually inherited.
|
boolean |
isInherited(Property<?> prop)
Indicates whether the property was inherited from a parent type.
|
boolean |
isPropertyBound(Property<?> prop) |
java.util.Iterator<PropertyValue> |
iterator() |
void |
merge(PropertySet other)
Merges the values from other into this set.
|
void |
remove(Property<?> prop) |
<T> void |
set(Property<T> prop,
T value) |
void |
set(PropertyValue propValue) |
void |
setBoundProperty(Property<?> property,
BoundAlarmProperty value) |
void |
setName(java.lang.String name) |
public IntersectedAlarmDefinition(java.util.List<AlarmDefinition> alarms)
public <T> void set(Property<T> prop, T value)
set
in interface MutablePropertyValueSource
public void set(PropertyValue propValue)
set
in interface MutablePropertyValueSource
public java.lang.String getName()
getName
in interface AlarmDefinition
public void setName(java.lang.String name)
setName
in interface AlarmDefinition
public boolean isPropertyBound(Property<?> prop)
isPropertyBound
in interface AlarmDefinition
public void setBoundProperty(Property<?> property, BoundAlarmProperty value)
setBoundProperty
in interface AlarmDefinition
public BoundAlarmProperty getBoundProperty(Property<?> property)
getBoundProperty
in interface AlarmDefinition
public <T> T get(Property<T> prop)
PropertyValueSource
get
in interface PropertyValueSource
public void remove(Property<?> prop)
remove
in interface MutablePropertyValueSource
public <T> T getOrDefault(Property<T> prop)
getOrDefault
in interface PropertyValueSource
Property.getDefaultValue()
if not present.public <T> T getOrElse(Property<T> property, T value)
PropertyValueSource
Property
, or else fall back to value if it's not present.getOrElse
in interface PropertyValueSource
value
- The value to default to if property isn't present.public java.util.Collection<Property<?>> getProperties()
getProperties
in interface PropertySet
public java.util.List<PropertyValue> getValues()
getValues
in interface PropertySet
public boolean contains(Property<?> prop)
contains
in interface PropertyValueSource
public int getCount()
PropertySet
getCount
in interface PropertySet
public java.util.Iterator<PropertyValue> iterator()
iterator
in interface java.lang.Iterable<PropertyValue>
public boolean isExtended(Property<?> prop)
PropertyValueSource
isExtended
in interface PropertyValueSource
public boolean isInherited(Property<?> prop)
PropertyValueSource
isInherited
in interface PropertyValueSource
public void merge(PropertySet other)
MutablePropertyValueSource
merge
in interface MutablePropertyValueSource