com.endeca.navigation
Class AssocDimLocations

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

public class AssocDimLocations
extends AbstractList
implements List

Class encapsulating a list of dimension locations (DimLocation objects) associated by their dimension. Note that the dimension locations are all from the same dimension.

The DimLocation objects are returned as part of an Endeca record via an AssocDimLocationsList object in the ERec data structure. The dimension locations designate the record's location within the dimension hierarchy.

Note: AssocDimLocations objects are unmodifiable and therefore do not support any modification operations (such as add, remove, and clear) that are inherited. Attempting to modify the object may result in a runtime exception (UnsupportedOperationException).


Field Summary
 
Fields inherited from class java.util.AbstractList
modCount
 
Method Summary
 Object get(int index)
          Gets the dimension location at position index.
 DimVal getDimRoot()
          Gets the root dimension value of the dimension all the locations these assocatiated locations are from.
 long getTotalNumLocations()
          Gets the total number of dimension locations belonging to this dimension.
 int size()
          Returns the number of DimLocation objects in this list.
 
Methods inherited from class java.util.AbstractList
add, add, addAll, clear, equals, hashCode, indexOf, iterator, lastIndexOf, listIterator, listIterator, remove, removeRange, set, 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, add, addAll, addAll, clear, contains, containsAll, equals, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, retainAll, set, subList, toArray, toArray
 

Method Detail

getDimRoot

public DimVal getDimRoot()
Gets the root dimension value of the dimension all the locations these assocatiated locations are from.

Returns:
Root dimension value from the common dimension of these locations.

getTotalNumLocations

public long getTotalNumLocations()
Gets the total number of dimension locations belonging to this dimension. Depending on the nature of the query where an associated dimension locations is obtained, the collection may only contain a subset of the locations of the group. This method gets the total number of the locations.

Class invariant:

 getTotalNumberLocations >= getLocations().size()
 

Returns:
Total number of dimension locations of this group.

get

public Object get(int index)
Gets the dimension location at position index. The object returned is of type DimLocation.

Specified by:
get in interface List
Specified by:
get in class AbstractList
Parameters:
index - offset of the desired dimension location.
Returns:
Dimension location at offset index.

size

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

Specified by:
size in interface Collection
Specified by:
size in interface List
Specified by:
size in class AbstractCollection
Returns:
Size of list.


2010 Endeca Technologies, Inc.
Endeca Confidential