public static class Field.EnumRecommender<T extends Enum<T>> extends Object implements Field.Recommender, Field.Validator
Modifier and Type | Field and Description |
---|---|
private Set<String> |
literals |
private String |
literalsStr |
private List<Object> |
validValues |
Constructor and Description |
---|
EnumRecommender(Class<T> enumType) |
Modifier and Type | Method and Description |
---|---|
int |
validate(Configuration config,
Field field,
Field.ValidationOutput problems)
Validate the supplied value for the field, and report any problems to the designated consumer.
|
List<Object> |
validValues(Field field,
Configuration config)
Return a set of recommended (and valid) values for the field given the current configuration values.
|
boolean |
visible(Field field,
Configuration config)
Set the visibility of the field given the current configuration values.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
and
private final String literalsStr
public List<Object> validValues(Field field, Configuration config)
Field.Recommender
validValues
in interface Field.Recommender
field
- the field for which the recommended values are to be found; may not be nullconfig
- the configuration; may not be nullpublic boolean visible(Field field, Configuration config)
Field.Recommender
visible
in interface Field.Recommender
field
- the field; may not be nullconfig
- the configuration; may not be nulltrue
if the field is to be visible, or false
otherwisepublic int validate(Configuration config, Field field, Field.ValidationOutput problems)
Field.Validator
validate
in interface Field.Validator
config
- the configuration containing the field to be validated; may not be nullfield
- the Field
being validated; never nullproblems
- the consumer to be called with each problem; never nullCopyright © 2016 JBoss by Red Hat. All rights reserved.