public class IntegerSpan extends java.util.AbstractSet<java.lang.Integer> implements CloneableSerializable
| Constructor and Description |
|---|
IntegerSpan(int minValue,
int maxValue)
Creates a new instance of IntegerSpan
|
| Modifier and Type | Method and Description |
|---|---|
IntegerSpan |
clone()
Creates a new clone (shallow copy) of this object.
|
boolean |
contains(int value)
Determines if the given value is within the inclusive bounds
|
boolean |
contains(java.lang.Object o) |
int |
getMaxValue()
Getter for maxValue
|
int |
getMinValue()
Getter for minValue
|
java.util.Iterator<java.lang.Integer> |
iterator() |
protected void |
setMaxValue(int maxValue)
Setter for maxValue
|
protected void |
setMinValue(int minValue)
Setter for minValue
|
int |
size() |
add, addAll, clear, containsAll, isEmpty, remove, retainAll, toArray, toArray, toStringfinalize, getClass, notify, notifyAll, wait, wait, waitpublic IntegerSpan(int minValue,
int maxValue)
minValue - Starting index, inclusivemaxValue - Stopping index, inclusivepublic IntegerSpan clone()
CloneableSerializableclone in interface CloneableSerializableclone in class java.lang.Objectpublic int getMinValue()
protected void setMinValue(int minValue)
minValue - Starting index, inclusivepublic int getMaxValue()
protected void setMaxValue(int maxValue)
maxValue - Stopping index, inclusivepublic java.util.Iterator<java.lang.Integer> iterator()
iterator in interface java.lang.Iterable<java.lang.Integer>iterator in interface java.util.Collection<java.lang.Integer>iterator in interface java.util.Set<java.lang.Integer>iterator in class java.util.AbstractCollection<java.lang.Integer>public int size()
size in interface java.util.Collection<java.lang.Integer>size in interface java.util.Set<java.lang.Integer>size in class java.util.AbstractCollection<java.lang.Integer>public boolean contains(int value)
value - Value to considerpublic boolean contains(java.lang.Object o)
contains in interface java.util.Collection<java.lang.Integer>contains in interface java.util.Set<java.lang.Integer>contains in class java.util.AbstractCollection<java.lang.Integer>