public class ArrayDomain<T> extends AbstractValueDomain<List<DataValue<T>>>
| Constructor and Description |
|---|
ArrayDomain()
Creates a new ArrayDomain instance.
|
ArrayDomain(int maxItems)
Creates a new ArrayDomain instance.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
contains(List<DataValue<T>> value)
Returns true if the given value belongs to this domain.
|
protected DataValue<List<DataValue<T>>> |
dataValueOf(List<DataValue<T>> value)
Returns a
DataValue for the given value in this domain. |
protected ValueDomain<Integer> |
getItemCount()
Returns the range for the number of array items.
|
ValueDomain<T> |
getItemValues()
Returns the value domain for required array items.
|
int |
getMaxItems()
Returns the maximum number of items for an unbounded array.
|
ValueDomain<T> |
getOtherItemValues()
Returns the value domain for additional array items.
|
DataValue.Type[] |
getTypes()
Return the type(s) of values that belong to this domain.
|
boolean |
isItemsUnique()
Returns if array items are unique.
|
void |
setItemCount(Integer itemCount)
Defines a constant number of array items.
|
void |
setItemCount(Integer min,
Integer max)
Defines the range for the number of array items.
|
void |
setItemCount(NumberDomain.Range range)
Defines the range for the number of array items.
|
protected void |
setItemCount(ValueDomain<Integer> domain)
Changes the range for the number of array items.
|
void |
setItemsUnique(boolean unique)
Changes if array items are unique.
|
void |
setItemValues(ValueDomain<T> itemValues)
Changes the value domain for required array items.
|
void |
setOtherItemValues(ValueDomain<?> otherItemValues)
Changes the value domain for additional array items.
|
String |
toString() |
Stream<DataValue<List<DataValue<T>>>> |
values(ResolverContext context)
Returns a random sequence of values from this domain.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitarrayOf, arrayOf, arrayOf, contains, containsObject, select, selectValue, valueOfpublic ArrayDomain()
public ArrayDomain(int maxItems)
public int getMaxItems()
public void setItemCount(Integer itemCount)
public void setItemCount(Integer min, Integer max)
public void setItemCount(NumberDomain.Range range)
protected void setItemCount(ValueDomain<Integer> domain)
protected ValueDomain<Integer> getItemCount()
public void setItemValues(ValueDomain<T> itemValues)
public ValueDomain<T> getItemValues()
public void setOtherItemValues(ValueDomain<?> otherItemValues)
public ValueDomain<T> getOtherItemValues()
public void setItemsUnique(boolean unique)
public boolean isItemsUnique()
public Stream<DataValue<List<DataValue<T>>>> values(ResolverContext context)
protected DataValue<List<DataValue<T>>> dataValueOf(List<DataValue<T>> value)
DataValue for the given value in this domain.dataValueOf in class AbstractValueDomain<List<DataValue<T>>>public boolean contains(List<DataValue<T>> value)
public DataValue.Type[] getTypes()
Copyright © 2020 The Cornutum Project. All rights reserved.