com.endeca.navigation
Class ERecSearchList

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

public class ERecSearchList
extends AbstractList
implements List

Class that encapsulates a collection of ERecSearch objects, each of which represents a record search.

ERecSearchList objects are returned from the MDEX Engine by the ENEQuery.getNavERecSearches() method. The ENEQuery.setNavERecSearches(ERecSearchList) method will set an ERecSearchList list of record searches to perform on the records of a navigation query. Both methods are also available in the UrlENEQuery class.

If required by an application, an ERecSearchList object can be created with the default constructor and the list can then be populated with ERecSearch objects by using the add(int,Object) method.


Field Summary
 
Fields inherited from class java.util.AbstractList
modCount
 
Constructor Summary
ERecSearchList()
          Default constructor that creates an empty ERecSearchList list.
 
Method Summary
 void add(int index, Object elementAt)
          Inserts the specified ERecSearch object at the specified position in this list.
 Object get(int index)
          Gets the ERecSearch object at position index.
 Object remove(int index)
          Removes the ERecSearch object at the specified position in this list.
 Object set(int index, Object elementAt)
          Replaces the ERecSearch at the specified position in this list with a new ERecSearch.
 int size()
          Returns the number of ERecSearch objects in this ERecSearchList.
 
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

ERecSearchList

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

Method Detail

set

public Object set(int index,
                  Object elementAt)
Replaces the ERecSearch at the specified position in this list with a new ERecSearch.

Specified by:
set in interface List
Overrides:
set in class AbstractList
Parameters:
index - offset of the ERecSearch object to be set.
elementAt - the ERecSearch object to be set.
Throws:
IndexOutOfBoundsException - if the index is out of range.

add

public void add(int index,
                Object elementAt)
Inserts the specified ERecSearch object 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 - the offset of the ERecSearch object to be inserted.
elementAt - the ERecSearch object to be inserted.
Throws:
IndexOutOfBoundsException - If the index is out of range.

remove

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

Specified by:
remove in interface List
Overrides:
remove in class AbstractList
Parameters:
index - the offset of the ERecSearch to be removed.
Returns:
the ERecSearch object previously at position index.
Throws:
IndexOutOfBoundsException - If the index is out of range.

get

public Object get(int index)
Gets the ERecSearch object at position index. Object returned is of type ERecSearch.

Specified by:
get in interface List
Specified by:
get in class AbstractList
Parameters:
index - the offset of the ERecSearch object to be returned.
Returns:
an ERecSearch object that is the element at position index
Throws:
IndexOutOfBoundsException - if the index is out of range.

size

public int size()
Returns the number of ERecSearch objects in this ERecSearchList.

Specified by:
size in interface Collection
Specified by:
size in interface List
Specified by:
size in class AbstractCollection
Returns:
The number of ERecSearch objects in the ERecSearchList.


© 2008 Endeca Technologies, Inc.
Endeca Confidential