org.omnaest.utils.structure.collection.list
Interface IndexList<E>

All Superinterfaces:
Collection<E>, Iterable<E>, List<E>
All Known Implementing Classes:
IndexArrayList

public interface IndexList<E>
extends List<E>

Defines an interface for lists that are based on an index structure. The performance of queries are much better, but performance of inserting is reduced.

Author:
Omnaest
See Also:
IndexTable

Method Summary
 int[] indexesOf(E e)
          Returns all index positions, where the data values at are equal to the given element.
 int[] indexesOfElementsEqualOrBetween(E smallestElement, E largestElement)
          Returns all index positions of elements that are between both as paramter given elements.
 int[] indexesOfElementsGreaterThan(E element)
          Returns all index positions of elements that are greater than the given element.
 int[] indexesOfElementsLessThan(E element)
          Returns all index positions of elements that have a lesser value than the given element.
 
Methods inherited from interface java.util.List
add, add, addAll, addAll, clear, contains, containsAll, equals, get, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, retainAll, set, size, subList, toArray, toArray
 

Method Detail

indexesOf

int[] indexesOf(E e)
Returns all index positions, where the data values at are equal to the given element.

Parameters:
e -
Returns:
See Also:
List.indexOf(Object), List.lastIndexOf(Object)

indexesOfElementsEqualOrBetween

int[] indexesOfElementsEqualOrBetween(E smallestElement,
                                      E largestElement)
Returns all index positions of elements that are between both as paramter given elements. Equal elements are included in the resulting array of index positions.

Parameters:
smallestElement -
largestElement -
Returns:

indexesOfElementsLessThan

int[] indexesOfElementsLessThan(E element)
Returns all index positions of elements that have a lesser value than the given element. Elements that equals are NOT included.

Parameters:
element -
Returns:

indexesOfElementsGreaterThan

int[] indexesOfElementsGreaterThan(E element)
Returns all index positions of elements that are greater than the given element. Equla elements are NOT inlcuded.

Parameters:
element -
Returns:


Copyright © 2013. All Rights Reserved.