com.vividsolutions.jts.util

Class CollectionUtil


public class CollectionUtil
extends java.lang.Object

Executes a transformation function on each element of a collection and returns the results in a new List.
Version:
1.7

Nested Class Summary

static interface
CollectionUtil.Function

Method Summary

static void
apply(Collection coll, CollectionUtil.Function func)
Executes a function on each item in a Collection but does not accumulate the result
static List
select(Collection collection, CollectionUtil.Function func)
Executes a function on each item in a Collection and collects all the entries for which the result of the function is equal to Boolean.TRUE.
static List
transform(Collection coll, CollectionUtil.Function func)
Executes a function on each item in a Collection and returns the results in a new List

Method Details

apply

public static void apply(Collection coll,
                         CollectionUtil.Function func)
Executes a function on each item in a Collection but does not accumulate the result
Parameters:
coll -
func - the Function to execute

select

public static List select(Collection collection,
                          CollectionUtil.Function func)
Executes a function on each item in a Collection and collects all the entries for which the result of the function is equal to Boolean.TRUE.
Parameters:
func - the Function to execute

transform

public static List transform(Collection coll,
                             CollectionUtil.Function func)
Executes a function on each item in a Collection and returns the results in a new List
Parameters:
coll -
func - the Function to execute