public abstract class EnumDomain<T> extends AbstractValueDomain<T>
Modifier | Constructor and Description |
---|---|
protected |
EnumDomain(DataValue.Type type,
Collection<T> enums)
Creates a new EnumDomain instance.
|
protected |
EnumDomain(DataValue.Type type,
Iterable<String> enums)
Creates a new EnumDomain instance.
|
Modifier and Type | Method and Description |
---|---|
boolean |
contains(T value)
Returns true if the given value belongs to this domain.
|
Iterable<T> |
getEnums()
Returns the enumerated values for this domain.
|
DataValue.Type[] |
getTypes()
Return the type(s) of values that belong to this domain.
|
String |
toString() |
protected abstract T |
valueOf(String value)
Returns the value represented by the given string.
|
Stream<DataValue<T>> |
values(ResolverContext context)
Returns a random sequence of values from this domain.
|
dataValueOf, getFormat, setFormat, withFormat
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
arrayOf, arrayOf, arrayOf, contains, containsObject, getType, select, selectValue
protected EnumDomain(DataValue.Type type, Iterable<String> enums)
protected EnumDomain(DataValue.Type type, Collection<T> enums)
protected abstract T valueOf(String value)
public Stream<DataValue<T>> values(ResolverContext context)
public boolean contains(T value)
public DataValue.Type[] getTypes()
Copyright © 2024 The Cornutum Project. All rights reserved.