All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class oplan.util.Seq

java.lang.Object
   |
   +----oplan.util.Seq

public abstract class Seq
extends Object
Seq defines some convenient methods for use with sequences, where a sequence is an Object[], a Vector, a List, or an Enumeration. Enumerations are used as a common intermediate form for conversions and are also given some operations of their own.

A Collector can be used as the source of an Enumeration. This gives us a very simple, but still open-ended, ability to handle new types.

See Also:
Collector

Constructor Index

 o Seq()

Method Index

 o addEnumeration(Collector, Enumeration)
 o elementAdder(Collector)
 o elements(Collector)
 o elements(List)
 o elements(Object[])
 o elements(Vector)
 o fillVector(Vector, Enumeration)
 o filter(Enumeration, Predicate1)
Takes an Enumeration e and a Predicate1 p and returns a "wrapper" Enumeration w such that the elements of w are the corresponding elements of e, omitting the elements of e for which p.trueOf returns false.
 o forEach(Enumeration, Function1)
Applies a Function1 to each element of an Enumeration and discards the results.
 o map(Enumeration, Function1)
Takes an Enumeration e and a Function1 f and returns a "wrapper" Enumeration w such that each element of w is the result of calling f on the corresponding element of e.
 o toArray(Enumeration)
 o toList(Enumeration)
 o toVector(Enumeration)

Constructors

 o Seq
 public Seq()

Methods

 o toVector
 public static Vector toVector(Enumeration e)
 o fillVector
 public static Vector fillVector(Vector v,
                                 Enumeration e)
 o toArray
 public static Object[] toArray(Enumeration e)
 o toList
 public static List toList(Enumeration e)
 o elements
 public static Enumeration elements(Vector v)
 o elements
 public static Enumeration elements(List l)
 o elements
 public static Enumeration elements(Object a[])
 o elements
 public static Enumeration elements(Collector c)
 o forEach
 public static void forEach(Enumeration e,
                            Function1 f)
Applies a Function1 to each element of an Enumeration and discards the results.

 o map
 public static Enumeration map(Enumeration e,
                               Function1 f)
Takes an Enumeration e and a Function1 f and returns a "wrapper" Enumeration w such that each element of w is the result of calling f on the corresponding element of e.

 o filter
 public static Enumeration filter(Enumeration e,
                                  Predicate1 p)
Takes an Enumeration e and a Predicate1 p and returns a "wrapper" Enumeration w such that the elements of w are the corresponding elements of e, omitting the elements of e for which p.trueOf returns false.

 o addEnumeration
 public static void addEnumeration(Collector c,
                                   Enumeration e)
 o elementAdder
 public static Function1 elementAdder(Collector c)

All Packages  Class Hierarchy  This Package  Previous  Next  Index