public class IntegerDomain extends NumberDomain<Integer>
NumberDomain.Range| Constructor and Description |
|---|
IntegerDomain()
Creates a new IntegerDomain instance.
|
IntegerDomain(int min,
int max)
Creates a new IntegerDomain instance.
|
IntegerDomain(long maxRange)
Creates a new IntegerDomain instance.
|
IntegerDomain(NumberDomain.Range range)
Creates a new IntegerDomain instance.
|
| Modifier and Type | Method and Description |
|---|---|
protected DataValue<Integer> |
dataValueOf(Integer value)
Returns a
DataValue for the given value in this domain. |
protected boolean |
isMultipleOf(Integer value,
Integer multiple)
Returns true if
value is a multiple of multiple. |
void |
setMultipleOf(String multipleOf)
If non-null, all values in this domain are a multiple of the given value.
|
void |
setNotMultipleOfs(String[] notMultipleOfs)
Changes the factors not allowed for any values in this domain.
|
void |
setRange(Integer min,
Integer max)
Defines the value range for this domain.
|
void |
setRange(NumberDomain.Range range)
Defines the value range for this domain.
|
Stream<DataValue<Integer>> |
values(ResolverContext context)
Returns a random sequence of values from this domain.
|
contains, getExcluded, getMax, getMaxRange, getMin, getMultipleOf, getNotMultipleOfs, getTypes, isNotExcluded, isNotMultipleOf, setExcluded, setMultipleOf, setNotMultipleOfs, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitarrayOf, arrayOf, arrayOf, contains, containsObject, select, selectValue, valueOfpublic IntegerDomain()
public IntegerDomain(long maxRange)
public IntegerDomain(int min,
int max)
public IntegerDomain(NumberDomain.Range range)
public void setRange(NumberDomain.Range range)
setRange in class NumberDomain<Integer>public void setRange(Integer min, Integer max)
setRange in class NumberDomain<Integer>public void setMultipleOf(String multipleOf)
setMultipleOf in class NumberDomain<Integer>public void setNotMultipleOfs(String[] notMultipleOfs)
setNotMultipleOfs in class NumberDomain<Integer>protected boolean isMultipleOf(Integer value, Integer multiple)
value is a multiple of multiple.isMultipleOf in class NumberDomain<Integer>public Stream<DataValue<Integer>> values(ResolverContext context)
protected DataValue<Integer> dataValueOf(Integer value)
DataValue for the given value in this domain.dataValueOf in class AbstractValueDomain<Integer>Copyright © 2020 The Cornutum Project. All rights reserved.