public class IrEnumDomain extends Object implements IrDomain
| Constructor and Description |
|---|
IrEnumDomain(int[] values) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
contains(int value)
Checks if a value is within this domain.
|
boolean |
equals(Object obj) |
int |
getHighBound()
Returns the largest integer contained in this domain.
|
int |
getLowBound()
Returns the smallest integer contained in this domain.
|
int[] |
getValues()
Returns all the values contained in this domain.
|
int |
hashCode() |
boolean |
isBounded()
Checks if this domain is defined as a lower and upper bound.
|
boolean |
isEmpty()
Checks if this domain contains any values.
|
gnu.trove.iterator.TIntIterator |
iterator()
Iterate over the domain in increasing order.
|
gnu.trove.iterator.TIntIterator |
iterator(boolean increasing)
Iterate over the domain in the specified order.
|
int |
size()
Returns how many values are contained in this domain.
|
String |
toString() |
void |
transferTo(gnu.trove.TIntCollection collection)
Put the contents of this domain inside the collection.
|
public IrEnumDomain(int[] values)
values - sorted, unique, and immutable integerspublic boolean isBounded()
public boolean contains(int value)
public int getLowBound()
getLowBound in interface IrDomainpublic int getHighBound()
getHighBound in interface IrDomainpublic boolean isEmpty()
public int size()
public int[] getValues()
public gnu.trove.iterator.TIntIterator iterator()
public gnu.trove.iterator.TIntIterator iterator(boolean increasing)
public void transferTo(gnu.trove.TIntCollection collection)
transferTo in interface IrDomaincollection - the collectionCopyright © 2013. All Rights Reserved.