Package com.macrofocus.utils
Interface IndexedNavigableSet<E>
-
- All Superinterfaces:
java.util.Collection<E>
,java.lang.Iterable<E>
,java.util.NavigableSet<E>
,java.util.Set<E>
,java.util.SortedSet<E>
- All Known Implementing Classes:
IndexedTreeSet
public interface IndexedNavigableSet<E> extends java.util.NavigableSet<E>
User: Vitaly Sazanovich Date: 08/02/13 Time: 09:56 Email: Vitaly.Sazanovich@gmail.com
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description int
entryIndex(E e)
Searches the specified tree map for the specified entry using the put algorithm.E
exact(int index)
Returns the entry located at the index offset from the beginning of the sorted set-
Methods inherited from interface java.util.NavigableSet
ceiling, descendingIterator, descendingSet, floor, headSet, headSet, higher, iterator, lower, pollFirst, pollLast, subSet, subSet, tailSet, tailSet
-
-
-
-
Method Detail
-
exact
E exact(int index)
Returns the entry located at the index offset from the beginning of the sorted set- Parameters:
index
- index of the entry- Returns:
- the entry located at the index (@code index) offset from the beginning of the sorted set
- Throws:
java.lang.ArrayIndexOutOfBoundsException
- if the specified index is less than 0 or greater than size-1
-
entryIndex
int entryIndex(E e)
Searches the specified tree map for the specified entry using the put algorithm. Calculates its offset from the beginning of the sorted map using weights.- Parameters:
e
- the entry- Returns:
- index of the searched entry, if it is contained in the tree map; otherwise a NullPointerException is thrown
- Throws:
java.lang.NullPointerException
- if the specified entry is null or does not exist
-
-