Class ListUtil
java.lang.Object
edu.jas.util.ListUtil
List utilities. For example map functor on list elements.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <C> booleanTest two iterables for equal contents and sequence.static <C> List<C> fill(int n, C e) Create a list of given length and content.map(List<C> list, UnaryFunctor<C, D> f) Map a unary function to the list.tupleFromList(List<List<C>> A) Tuple from lists.
-
Constructor Details
-
ListUtil
public ListUtil()
-
-
Method Details
-
map
public static <C extends Element<C>, D extends Element<D>> List<D> map(List<C> list, UnaryFunctor<C, D> f) Map a unary function to the list.- Parameters:
f- evaluation functor.- Returns:
- new list elements f(list(i)).
-
tupleFromList
-
fill
Create a list of given length and content.- Parameters:
n- length of new liste- object to be filled in- Returns:
- list (e, ..., e) of length n
-
equals
-