com.endeca.navigation
Class RangeFilterList

java.lang.Object
  extended by java.util.AbstractCollection<E>
      extended by java.util.AbstractList
          extended by com.endeca.navigation.RangeFilterList
All Implemented Interfaces:
Iterable, Collection, List

public class RangeFilterList
extends AbstractList
implements List

Class that encapsulates a collection of range filters (RangeFilter objects).


Field Summary
 
Fields inherited from class java.util.AbstractList
modCount
 
Constructor Summary
RangeFilterList()
          Default constructor that creates an empty list.
 
Method Summary
 void add(int index, Object elementAt)
          Inserts the specified RangeFilter at the specified position in this list.
 Object get(int index)
          Gets the RangeFilter at position index.
 Object remove(int index)
          Removes the RangeFilter at the specified position in this list.
 Object set(int index, Object elementAt)
          Replaces the RangeFilter object at the specified position in this list with the specified RangeFilter.
 int size()
          Returns the number of elements in this list.
 
Methods inherited from class java.util.AbstractList
add, addAll, clear, equals, hashCode, indexOf, iterator, lastIndexOf, listIterator, listIterator, removeRange, subList
 
Methods inherited from class java.util.AbstractCollection
addAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.List
add, addAll, addAll, clear, contains, containsAll, equals, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, removeAll, retainAll, subList, toArray, toArray
 

Constructor Detail

RangeFilterList

public RangeFilterList()
Default constructor that creates an empty list.

Method Detail

set

public Object set(int index,
                  Object elementAt)
Replaces the RangeFilter object at the specified position in this list with the specified RangeFilter.

Specified by:
set in interface List
Overrides:
set in class AbstractList
Parameters:
index - Offset of the RangeFilter to be replaced.
elementAt - RangeFilter object to be set.
Throws:
IndexOutOfBoundsException - If index is out of range.

add

public void add(int index,
                Object elementAt)
Inserts the specified RangeFilter at the specified position in this list. Shifts the element currently at that position (if any) and any subsequent elements to the right (adds one to their indices).

Specified by:
add in interface List
Overrides:
add in class AbstractList
Parameters:
index - Offset of the element.
elementAt - RangeFilter object to be inserted.
Throws:
IndexOutOfBoundsException - If index is out of range.

remove

public Object remove(int index)
Removes the RangeFilter at the specified position in this list. Shifts any subsequent elements to the left (subtracts one from their indices). Returns the element that was removed from the list.

Specified by:
remove in interface List
Overrides:
remove in class AbstractList
Parameters:
index - Offset of element.
Returns:
RangeFilter object previously at position index.
Throws:
IndexOutOfBoundsException - If index is out of range.

get

public Object get(int index)
Gets the RangeFilter at position index.

Specified by:
get in interface List
Specified by:
get in class AbstractList
Parameters:
index - Offset of element.
Returns:
RangeFilter object at position index.
Throws:
IndexOutOfBoundsException - If index is out of range.

size

public int size()
Returns the number of elements in this list.

Specified by:
size in interface Collection
Specified by:
size in interface List
Specified by:
size in class AbstractCollection
Returns:
Number of elements (RangeFilter objects) in the list.


© 2011 Endeca Technologies, Inc.
Endeca Confidential