public abstract class ConstantDomain<T> extends AbstractValueDomain<T>
Modifier | Constructor and Description |
---|---|
protected |
ConstantDomain(DataValue.Type type,
T value)
Creates a new ConstantDomain instance.
|
Modifier and Type | Method and Description |
---|---|
boolean |
contains(T value)
Returns true if the given value belongs to this domain.
|
DataValue.Type[] |
getTypes()
Return the type(s) of values that belong to this domain.
|
T |
getValue()
Returns the constant value for this domain.
|
String |
toString() |
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 ConstantDomain(DataValue.Type type, T value)
public T getValue()
public Stream<DataValue<T>> values(ResolverContext context)
public boolean contains(T value)
public DataValue.Type[] getTypes()
Copyright © 2024 The Cornutum Project. All rights reserved.