|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectinfo.javelot.functionalj.tuple.Tuples
Contains static methods to operate on tuples.
| Method Summary | |
static Pair |
unzipPairs(List p_list)
Unzips a list of Pairs into a Pair of lists, with the first
list containing all of the first elements of the pairs, and the second list
containing all of the second elements of the pairs. |
static Pair |
unzipPairs(Pair[] p_pairs)
Unzips an array of Pairs into a Pair of lists, similarily to
the unzipPairs(List) method. |
static Quadruple |
unzipQuadruples(List p_list)
Unzips a list of Quadruples into a Quadruple of lists,
similarily to the unzipPairs(List) method. |
static Quadruple |
unzipQuadruples(Quadruple[] p_quadruples)
Unzips an array of Quadruples into a Quadruple of lists,
similarily to the unzipPairs(List) method. |
static Triple |
unzipTriples(List p_list)
Unzips a list of Triples into a Triple of lists, similarily to
the unzipPairs(List) method. |
static Triple |
unzipTriples(Triple[] p_triples)
Unzips an array of Triples into a Triple of lists, similarily
to the unzipPairs(List) method. |
static List |
zip(List p_list1,
List p_list2)
Zips objects from the two lists to return a list of Pairs. |
static List |
zip(List p_list1,
List p_list2,
List p_list3)
Zips objects from the three lists to return a list of Triples,
similarily to the zip(List,List) method. |
static List |
zip(List p_list1,
List p_list2,
List p_list3,
List p_list4)
Zips objects from the four lists to return a list of Quadruples,
similarily to the zip(List,List) method. |
static List |
zip(Object[] p_array1,
Object[] p_array2)
Zips objects from the two arrays to return a list of Pairs,
similarily to the zip(List,List) method. |
static List |
zip(Object[] p_array1,
Object[] p_array2,
Object[] p_array3)
Zips objects from the three arrays to return a list of Triples,
similarily to the zip(List,List) method. |
static List |
zip(Object[] p_array1,
Object[] p_array2,
Object[] p_array3,
Object[] p_array4)
Zips objects from the four arrays to return a list of Quadruples,
similarily to the zip(List,List) method. |
static List |
zipWith(Function p_function,
List[] p_lists)
Zips objects from the lists to return a list of objects returned by the specified function. |
static List |
zipWith(Function p_function,
List p_list1,
List p_list2)
Zips objects from the two lists to return a list of objects returned by the specified function. |
static List |
zipWith(Function p_function,
List p_list1,
List p_list2,
List p_list3)
Zips objects from the three lists to return a list of objects returned by the specified function. |
static List |
zipWith(Function p_function,
List p_list1,
List p_list2,
List p_list3,
List p_list4)
Zips objects from the four lists to return a list of objects returned by the specified function. |
static List |
zipWith(Function p_function,
Object[] p_array1,
Object[] p_array2)
Zips objects from the two arrays to return a list of objects returned by the specified function. |
static List |
zipWith(Function p_function,
Object[] p_array1,
Object[] p_array2,
Object[] p_array3)
Zips objects from the three arrays to return a list of objects returned by the specified function. |
static List |
zipWith(Function p_function,
Object[] p_array1,
Object[] p_array2,
Object[] p_array3,
Object[] p_array4)
Zips objects from the four arrays to return a list of objects returned by the specified function. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
public static List zip(List p_list1,
List p_list2)
Pairs. This method
calls zipWith(Function,List,List), passing the Pair.Pair(Object,Object) constructor function and the two lists. If the lists
contain an unequal number of objects, the number of Pairs returned is
equal to the number of objects contained in the smaller of the two lists.
p_list1 - the first of the two lists of objects to zip.p_list2 - the second of the two lists of objects to zip.
Pairs.
public static List zip(List p_list1,
List p_list2,
List p_list3)
Triples,
similarily to the zip(List,List) method.
public static List zip(List p_list1,
List p_list2,
List p_list3,
List p_list4)
Quadruples,
similarily to the zip(List,List) method.
public static List zip(Object[] p_array1,
Object[] p_array2)
Pairs,
similarily to the zip(List,List) method.
public static List zip(Object[] p_array1,
Object[] p_array2,
Object[] p_array3)
Triples,
similarily to the zip(List,List) method.
public static List zip(Object[] p_array1,
Object[] p_array2,
Object[] p_array3,
Object[] p_array4)
Quadruples,
similarily to the zip(List,List) method.
public static List zipWith(Function p_function,
List p_list1,
List p_list2)
zipWith(Function,List[]) method for more
details.
zipWith(Function,List[])
public static List zipWith(Function p_function,
Object[] p_array1,
Object[] p_array2)
zipWith(Function,List[]) method for more
details.
zipWith(Function,List[])
public static List zipWith(Function p_function,
List p_list1,
List p_list2,
List p_list3)
zipWith(Function,List[]) method for more
details.
zipWith(Function,List[])
public static List zipWith(Function p_function,
Object[] p_array1,
Object[] p_array2,
Object[] p_array3)
zipWith(Function,List[]) method for more
details.
zipWith(Function,List[])
public static List zipWith(Function p_function,
List p_list1,
List p_list2,
List p_list3,
List p_list4)
zipWith(Function,List[]) method for more
details.
zipWith(Function,List[])
public static List zipWith(Function p_function,
Object[] p_array1,
Object[] p_array2,
Object[] p_array3,
Object[] p_array4)
zipWith(Function,List[]) method for more
details.
zipWith(Function,List[])
public static List zipWith(Function p_function,
List[] p_lists)
InstanceFunction
for which the object has not been specified, and that accepts one less
parameter than there are lists. The function is called using corresponding
objects from the lists, and a list of results is returned. If the lists are
not of the same size, the size of the smallest list is used. Thus objects of
the lists that exceed the size of the smallest list are not used.
p_function - the function which is called to zip the objects from the
lists.p_lists - the lists of objects to zip.
public static Pair unzipPairs(List p_list)
Pairs into a Pair of lists, with the first
list containing all of the first elements of the pairs, and the second list
containing all of the second elements of the pairs.
p_list - the list of Pairs to be unzipped.
Pair containing two lists, one of the first elements of the
pairs, and one of the second elements of the pairs.public static Pair unzipPairs(Pair[] p_pairs)
Pairs into a Pair of lists, similarily to
the unzipPairs(List) method.
unzipPairs(List)public static Triple unzipTriples(List p_list)
Triples into a Triple of lists, similarily to
the unzipPairs(List) method.
unzipPairs(List)public static Triple unzipTriples(Triple[] p_triples)
Triples into a Triple of lists, similarily
to the unzipPairs(List) method.
unzipPairs(List)public static Quadruple unzipQuadruples(List p_list)
Quadruples into a Quadruple of lists,
similarily to the unzipPairs(List) method.
unzipPairs(List)public static Quadruple unzipQuadruples(Quadruple[] p_quadruples)
Quadruples into a Quadruple of lists,
similarily to the unzipPairs(List) method.
unzipPairs(List)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||