public final class

F

extends Object
java.lang.Object
   ↳ es.usc.citius.hipster.util.F

Class Overview

This class contains a very limited set of functions to process iterables and iterators in a lazy way. Guava / Java 8 is not an option due to current size / compatibility restrictions. Required since the removal of Guava dependencies (issue #125 https://github.com/citiususc/hipster/issues/125) NOTE: This class may be removed in future versions to take advantage of Java 8 functional Streams Pure functional programmers, please forgive us for this crime

Summary

Public Methods
static <T> Iterable<T> filter(Iterable<T> it, Function<? super T, Boolean> condition)
static <T> Iterator<T> filter(Iterator<T> it, Function<? super T, Boolean> condition)
static <E, T> Iterator<T> flatMap(Iterator<E> it, Function<? super E, ? extends Iterator<? extends T>> mapf)
static <E, T> Iterable<T> flatMap(Iterable<E> it, Function<? super E, ? extends Iterable<? extends T>> mapf)
static <T, E> Iterable<E> map(Iterable<T> it, Function<? super T, ? extends E> mapf)
static <T, E> Iterator<E> map(Iterator<T> it, Function<? super T, ? extends E> mapf)
[Expand]
Inherited Methods
From class java.lang.Object

Public Methods

public static Iterable<T> filter (Iterable<T> it, Function<? super T, Boolean> condition)

public static Iterator<T> filter (Iterator<T> it, Function<? super T, Boolean> condition)

public static Iterator<T> flatMap (Iterator<E> it, Function<? super E, ? extends Iterator<? extends T>> mapf)

public static Iterable<T> flatMap (Iterable<E> it, Function<? super E, ? extends Iterable<? extends T>> mapf)

public static Iterable<E> map (Iterable<T> it, Function<? super T, ? extends E> mapf)

public static Iterator<E> map (Iterator<T> it, Function<? super T, ? extends E> mapf)