public class DelegatePropertySet extends java.lang.Object implements PropertySet
EMPTY| Constructor and Description |
|---|
DelegatePropertySet() |
DelegatePropertySet(PropertySet target) |
| 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.
|
int |
getCount() |
<T> T |
getOrDefault(Property<T> prop) |
<T> T |
getOrElse(Property<T> prop,
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() |
PropertySet |
getTarget() |
java.util.List<PropertyValue> |
getValues() |
boolean |
hasTarget() |
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.
|
java.util.Iterator<PropertyValue> |
iterator() |
void |
merge(PropertySet other,
boolean local)
Merges the values from other collection into this one.
|
void |
remove(Property<?> prop) |
<T> void |
set(Property<T> prop,
T value) |
void |
set(PropertyValue propValue) |
void |
setDelegateTarget(PropertySet value) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitbuilder, extend, getExtension, newDefaultInstance, newExtensionpublic DelegatePropertySet()
public DelegatePropertySet(PropertySet target)
public void setDelegateTarget(PropertySet value)
public boolean hasTarget()
public PropertySet getTarget()
public <T> T get(Property<T> prop)
PropertyValueSourceget in interface PropertyValueSourcepublic <T> void set(Property<T> prop, T value)
set in interface MutablePropertyValueSourcepublic boolean contains(Property<?> prop)
contains in interface PropertyValueSourcepublic void set(PropertyValue propValue)
set in interface MutablePropertyValueSourcepublic java.util.Iterator<PropertyValue> iterator()
iterator in interface java.lang.Iterable<PropertyValue>public void remove(Property<?> prop)
remove in interface MutablePropertyValueSourcepublic <T> T getOrDefault(Property<T> prop)
getOrDefault in interface PropertyValueSourceProperty.getDefaultValue() if not present.public java.util.Collection<Property<?>> getProperties()
getProperties in interface PropertyValueSourcepublic java.util.List<PropertyValue> getValues()
getValues in interface PropertyValueSourcepublic boolean isExtended(Property<?> prop)
PropertySetisExtended in interface PropertySetpublic <T> T getOrElse(Property<T> prop, T value)
PropertyValueSourceProperty, or else fall back to value if it's not present.getOrElse in interface PropertyValueSourceprop - The Property for which a value is to be retrieved.value - The value to default to if property isn't present.public boolean isInherited(Property<?> prop)
PropertySetisInherited in interface PropertySetpublic void merge(PropertySet other, boolean local)
Mergablemerge in interface Mergable<PropertySet>merge in interface MutablePropertyValueSource