Package com.macrofocus.utils
Interface IndexedNavigableSet<E>
- All Superinterfaces:
Collection<E>
,Iterable<E>
,NavigableSet<E>
,Set<E>
,SortedSet<E>
- All Known Implementing Classes:
IndexedTreeSet
User: Vitaly Sazanovich
Date: 08/02/13
Time: 09:56
Email: Vitaly.Sazanovich@gmail.com
-
Method Summary
Modifier and TypeMethodDescriptionint
entryIndex
(E e) Searches the specified tree map for the specified entry using the put algorithm.exact
(int index) Returns the entry located at the index offset from the beginning of the sorted setMethods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArray
Methods inherited from interface java.util.NavigableSet
ceiling, descendingIterator, descendingSet, floor, headSet, headSet, higher, iterator, lower, pollFirst, pollLast, subSet, subSet, tailSet, tailSet
Methods inherited from interface java.util.Set
add, addAll, clear, contains, containsAll, equals, hashCode, isEmpty, remove, removeAll, retainAll, size, toArray, toArray
Methods inherited from interface java.util.SortedSet
comparator, first, last, spliterator
-
Method Details
-
exact
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:
ArrayIndexOutOfBoundsException
- if the specified index is less than 0 or greater than size-1
-
entryIndex
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:
NullPointerException
- if the specified entry is null or does not exist
-