org.inria.ns.reflex.processor.xcl
Class GroupFunction.OuterList

java.lang.Object
  extended by java.util.AbstractCollection<E>
      extended by java.util.AbstractList
          extended by org.inria.ns.reflex.util.DynamicList.Impl
              extended by org.inria.ns.reflex.processor.xcl.GroupFunction.OuterList
All Implemented Interfaces:
Iterable, Collection, List, Unwrappable, DynamicList
Enclosing class:
GroupFunction

public static class GroupFunction.OuterList
extends DynamicList.Impl
implements DynamicList, Unwrappable

A list used for grouping items according to some criteria. This list will iterate on the list to group in a streaming mode, keeping only no more than 2 items. Each item of the outer list is a list of all the items that are in the same group according to the criteria. When an outer list is created, the first item of the group is set as the current object to the XPath variable context supplied.

Author:
Philippe Poulard

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.inria.ns.reflex.util.DynamicList
DynamicList.AbstractCompleted, DynamicList.Completed, DynamicList.Impl
 
Nested classes/interfaces inherited from interface org.inria.ns.reflex.structures.Unwrappable
Unwrappable.Unwrapper
 
Field Summary
 
Fields inherited from interface org.inria.ns.reflex.structures.Unwrappable
UNWRAPPER
 
Constructor Summary
GroupFunction.OuterList(Iterator toGroup, XPathContext context, List criteria)
          Create a new list for grouping items.
GroupFunction.OuterList(List toGroup, XPathContext context, List criteria)
          Create a new list for grouping items.
 
Method Summary
 
Methods inherited from class org.inria.ns.reflex.util.DynamicList.Impl
completed, get, getCurrent, size, unwrap
 
Methods inherited from class java.util.AbstractList
add, add, addAll, clear, equals, hashCode, indexOf, iterator, lastIndexOf, listIterator, listIterator, remove, 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
getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.inria.ns.reflex.util.DynamicList
completed
 
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
 
Methods inherited from interface org.inria.ns.reflex.structures.Unwrappable
unwrap
 

Constructor Detail

GroupFunction.OuterList

public GroupFunction.OuterList(List toGroup,
                               XPathContext context,
                               List criteria)
Create a new list for grouping items.

Parameters:
toGroup - The list to group.
context - The context used to evaluate the criteria.
criteria - A list of deferred argument criteria.
See Also:
DeferredArgument

GroupFunction.OuterList

public GroupFunction.OuterList(Iterator toGroup,
                               XPathContext context,
                               List criteria)
Create a new list for grouping items.

Parameters:
toGroup - The items to group.
context - The context used to evaluate the criteria.
criteria - A list of deferred argument criteria.
See Also:
DeferredArgument