|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface Indexes
Represents indexes as used in expand parameters. The size of the whole collection is required on most of this class methods as it can handle indexes specified as:
i and j are positive integers.
| Method Summary | |
|---|---|
boolean |
contains(int index,
int size)
Checks wether the index is |
java.util.SortedSet<java.lang.Integer> |
getIndexes(int size)
Gets a sorted set of all indexes, negative indexes having been translated into their positive counter part. |
int |
getMaxIndex(int size)
Gets the maximum index in the range, given the total size of the collection to consider. |
int |
getMinIndex(int size)
Gets the minimum index in the range, given the total size of the collection to consider. |
boolean |
isRange()
Tells whether this represents a contiguous range. |
| Method Detail |
|---|
boolean isRange()
this represents a contiguous range. If not a range it is a single index,
and getMinIndex(int) and getMaxIndex(int) will return the same value.
true if this is a range.int getMinIndex(int size)
size - the size of the collection to consider.
int getMaxIndex(int size)
size - the size of the collection to consider.
boolean contains(int index,
int size)
index - the index to look for.size - the size of the overall collection to consider.
true if it does contain the given index, false otherwise.java.util.SortedSet<java.lang.Integer> getIndexes(int size)
size - the size of the overall collection to consider.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||