public class BindingProperty extends Property
Constructor and Description |
---|
BindingProperty(String name) |
Modifier and Type | Method and Description |
---|---|
void |
addCollapsedValues(String... values)
Add an equivalence set of property values.
|
void |
addDefinedValue(Condition condition,
String newValue) |
void |
addFallbackValue(String value,
String fallbackValue)
Adds fall back value to given property name.
|
String[] |
getAllowedValues(Condition condition)
Returns the set of allowed values in sorted order when a certain condition
is satisfied.
|
List<SortedSet<String>> |
getCollapsedValues() |
Map<Condition,SortedSet<String>> |
getConditionalValues() |
String |
getConstrainedValue()
If the BindingProperty has exactly one value across all conditions and
permutations, return that value otherwise return
null . |
String[] |
getDefinedValues()
Returns the set of defined values in sorted order.
|
String |
getFallback()
Returns the fallback value for this property, or the empty string if none.
|
Map<String,? extends List<? extends Set<String>>> |
getFallbackValuesMap()
Returns the map of values to fall back values.
|
String |
getFirstLegalValue()
Returns the first legal value for this property that can be found.
|
PropertyProvider |
getProvider() |
Class<? extends PropertyProviderGenerator> |
getProviderGenerator() |
Set<String> |
getRequiredProperties() |
ConditionAll |
getRootCondition() |
boolean |
isAllowedValue(String value)
Returns true if the supplied value is legal under some condition.
|
boolean |
isDefinedValue(String value)
Returns
true if the value was previously provided to
addDefinedValue(Condition,String) . |
boolean |
isDerived()
Returns
true if the value of this BindingProperty is always
derived from other BindingProperties. |
void |
setAllowedValues(Condition condition,
String... values)
Set the currently allowed values.
|
void |
setFallback(String token) |
void |
setProvider(PropertyProvider provider) |
void |
setProviderGenerator(Class<? extends PropertyProviderGenerator> generator)
Set a provider generator for this property.
|
public static final String GLOB_STAR
public BindingProperty(String name)
public void addCollapsedValues(String... values)
public void addFallbackValue(String value, String fallbackValue)
value
- the property value.fallbackValue
- the fall back value for given property value.public String[] getAllowedValues(Condition condition)
public String getConstrainedValue()
null
.public String[] getDefinedValues()
public String getFallback()
public Map<String,? extends List<? extends Set<String>>> getFallbackValuesMap()
public String getFirstLegalValue()
public PropertyProvider getProvider()
public Class<? extends PropertyProviderGenerator> getProviderGenerator()
public ConditionAll getRootCondition()
public boolean isAllowedValue(String value)
public boolean isDefinedValue(String value)
true
if the value was previously provided to
addDefinedValue(Condition,String)
.public boolean isDerived()
true
if the value of this BindingProperty is always
derived from other BindingProperties. That is, for each Condition in the
BindingProperty, there is exactly one allowed value.public void setAllowedValues(Condition condition, String... values)
IllegalArgumentException
- if any of the provided values were not
provided to addDefinedValue(Condition,String)
.public void setFallback(String token)
public void setProvider(PropertyProvider provider)
public void setProviderGenerator(Class<? extends PropertyProviderGenerator> generator)
generator
- Copyright © 2018. All rights reserved.