|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object ix.util.Seq
public abstract class Seq
Seq defines some convenient methods for use with sequences, where a sequence is an Object[], a Vector, a LList, or an Enumeration. Enumerations are used as a common intermediate form for conversions and are also given some operations of their own.
A Collection can be used as the source of an Enumeration. This gives us a simple, but still open-ended, ability to handle new types.
Needs further modification to better fit Collections and Iterators
Collection
Nested Class Summary | |
---|---|
static class |
Seq.IteratorEnumeration
|
Method Summary | |
---|---|
static void |
addEnumeration(Collector c,
java.util.Enumeration e)
|
static Function1 |
elementAdder(Collector c)
|
static java.util.Enumeration |
elements(java.util.Collection c)
|
static java.util.Enumeration |
elements(LList l)
|
static java.util.Enumeration |
elements(java.lang.Object[] a)
|
static java.util.Enumeration |
elements(java.util.Vector v)
|
static java.util.Vector |
fillVector(java.util.Vector v,
java.util.Enumeration e)
|
static java.util.Enumeration |
filter(java.util.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. |
static void |
forEach(java.util.Enumeration e,
Function1 f)
Applies a Function1 to each element of an Enumeration and discards the results. |
static java.util.Enumeration |
map(java.util.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. |
static java.util.Vector |
shuffleVector(java.util.Vector v)
|
static java.lang.Object[] |
toArray(java.util.Enumeration e)
|
static LList |
toLList(java.util.Enumeration e)
|
static java.util.Vector |
toVector(java.util.Enumeration e)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static java.util.Vector toVector(java.util.Enumeration e)
public static java.util.Vector fillVector(java.util.Vector v, java.util.Enumeration e)
public static java.lang.Object[] toArray(java.util.Enumeration e)
public static LList toLList(java.util.Enumeration e)
public static java.util.Enumeration elements(java.util.Vector v)
public static java.util.Enumeration elements(LList l)
public static java.util.Enumeration elements(java.lang.Object[] a)
public static java.util.Enumeration elements(java.util.Collection c)
public static void forEach(java.util.Enumeration e, Function1 f)
public static java.util.Enumeration map(java.util.Enumeration e, Function1 f)
public static java.util.Enumeration filter(java.util.Enumeration e, Predicate1 p)
public static void addEnumeration(Collector c, java.util.Enumeration e)
public static Function1 elementAdder(Collector c)
public static java.util.Vector shuffleVector(java.util.Vector v)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |