public enum IrBoolDomain extends Enum<IrBoolDomain> implements IrDomain
Enum Constant and Description |
---|
BoolDomain |
FalseDomain |
TrueDomain |
Modifier and Type | Method and Description |
---|---|
boolean |
contains(boolean value) |
boolean |
contains(int value)
Checks if a value is within this domain.
|
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.
|
IrBoolDomain |
invert()
Reverse the domain.
|
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.
|
static IrBoolDomain |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static IrBoolDomain[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final IrBoolDomain TrueDomain
public static final IrBoolDomain FalseDomain
public static final IrBoolDomain BoolDomain
public static IrBoolDomain[] values()
for (IrBoolDomain c : IrBoolDomain.values()) System.out.println(c);
public static IrBoolDomain valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant
with the specified nameNullPointerException
- if the argument is nullpublic boolean isBounded()
IrDomain
public boolean contains(boolean value)
value
- test this valuetrue
if and only if the domain contains the value
,
false
otherwisepublic boolean contains(int value)
IrDomain
public int getLowBound()
IrDomain
getLowBound
in interface IrDomain
public int getHighBound()
IrDomain
getHighBound
in interface IrDomain
public boolean isEmpty()
IrDomain
public int size()
IrDomain
public IrBoolDomain invert()
public int[] getValues()
IrDomain
public gnu.trove.iterator.TIntIterator iterator()
IrDomain
public gnu.trove.iterator.TIntIterator iterator(boolean increasing)
IrDomain
public void transferTo(gnu.trove.TIntCollection collection)
IrDomain
transferTo
in interface IrDomain
collection
- the collectionpublic String toString()
toString
in class Enum<IrBoolDomain>
Copyright © 2013. All Rights Reserved.