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. |
String |
getFormat()
Returns the format for values that belong to this domain.
|
protected boolean |
isMultipleOf(Integer value,
Integer multiple)
Returns true if
value is a multiple of multiple . |
void |
setFormat(String format)
Changes the format for values that belong to this domain.
|
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, toString
withFormat
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
arrayOf, arrayOf, arrayOf, contains, containsObject, getType, select, selectValue
public 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)
public void setFormat(String format)
setFormat
in class AbstractValueDomain<Integer>
public String getFormat()
getFormat
in interface ValueDomain<Integer>
getFormat
in class AbstractValueDomain<Integer>
protected DataValue<Integer> dataValueOf(Integer value)
DataValue
for the given value in this domain.dataValueOf
in class AbstractValueDomain<Integer>
Copyright © 2024 The Cornutum Project. All rights reserved.