public class DefaultSelectionProperty extends Object implements SelectionProperty
Constructor and Description |
---|
DefaultSelectionProperty(String currentValue,
String fallbackValue,
String name,
SortedSet<String> possibleValues)
Construct a selection property.
|
DefaultSelectionProperty(String currentValue,
String fallbackValue,
String name,
SortedSet<String> possibleValues,
Map<String,? extends List<? extends Set<String>>> fallbackValueMap)
Construct a selection property.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
String |
getCurrentValue()
The value for the permutation currently being considered.
|
String |
getFallbackValue()
Gets the fallback value for the property.
|
List<? extends Set<String>> |
getFallbackValues(String value)
Returns the list of fall back values for a given value.
|
String |
getName()
The name of the property.
|
SortedSet<String> |
getPossibleValues()
Returns the possible values for the property in sorted order.
|
int |
hashCode() |
String |
toString() |
public DefaultSelectionProperty(String currentValue, String fallbackValue, String name, SortedSet<String> possibleValues)
currentValue
- current value of this property, must not be nullfallbackValue
- the fallback value to use, must not be nullname
- the name of this property, must not be nullpossibleValues
- the set of possible values, must not be null and
will be returned to callers, so a copy should be passed into this
ctor if the caller will use this set laterpublic DefaultSelectionProperty(String currentValue, String fallbackValue, String name, SortedSet<String> possibleValues, Map<String,? extends List<? extends Set<String>>> fallbackValueMap)
currentValue
- current value of this property, must not be nullfallbackValue
- the fallback value to use, must not be nullname
- the name of this property, must not be nullpossibleValues
- the set of possible values, must not be null and
will be returned to callers, so a copy should be passed into this
ctor if the caller will use this set laterfallbackValueMap
- the map propertyValue to fallback valuespublic String getCurrentValue()
SelectionProperty
getCurrentValue
in interface SelectionProperty
public String getFallbackValue()
SelectionProperty
getFallbackValue
in interface SelectionProperty
public List<? extends Set<String>> getFallbackValues(String value)
SelectionProperty
getFallbackValues
in interface SelectionProperty
value
- the property valuepublic String getName()
SelectionProperty
getName
in interface SelectionProperty
public SortedSet<String> getPossibleValues()
SelectionProperty
getPossibleValues
in interface SelectionProperty
Copyright © 2018. All rights reserved.