public class LSInterval
extends java.lang.Object
LSExpression.getIntervalValue() or LSSolution.getIntervalValue(localsolver.LSExpression).LSSolution,
LSExpression| Constructor and Description |
|---|
LSInterval() |
LSInterval(long start,
long end) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
contains(long value)
Returns true if the interval contains the given value, false otherwise.
|
long |
count()
Returns the number of elements in the interval.
|
boolean |
equals(java.lang.Object obj) |
long |
getEnd()
Returns the end of the interval.
|
long |
getStart()
Returns the start of the interval.
|
int |
hashCode() |
boolean |
isDegenerate()
Returns true if the interval is degenerate.
|
boolean |
isVoid()
Returns true if the interval is void.
|
java.util.Iterator<java.lang.Long> |
iterator()
Returns an iterator for the content of this interval.
|
java.lang.String |
toString()
Returns a string representation of the interval.
|
public LSInterval()
public LSInterval(long start,
long end)
public boolean isVoid()
public boolean isDegenerate()
public long getStart()
public long getEnd()
public long count()
public boolean contains(long value)
value - Element whose presence in this interval is to be tested.public java.lang.String toString()
toString in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic java.util.Iterator<java.lang.Long> iterator()