public static <InputType, OutputType> List<OutputType> map(
      final Collection<? extends InputType> elements,
      final ICollectionMapper<InputType, OutputType> mapper) {
    final List<OutputType> list = new ArrayList<OutputType>();

    for (final InputType element : elements) {
      list.add(mapper.map(element));
    }

    return list;
  }
Performs an operation on all items that pass a filter check.

@param <ItemType> The type of the items in the collection.
@param <CollectionType> The type of the collection.
@param collection The collection that provides the items.
@param callback The callback that filters the collection and performs an operation on each item
    that passes the filter check.
java/zylib/src/main/java/com/google/security/zynamics/zylib/types/common/CollectionHelpers.java