Package org.apache.tapestry5.func
package org.apache.tapestry5.func
Light-weight functional programming for Flows of values
-
ClassDescriptionFunctional operations on collections with generics support.Flow<T>A flow is a a functional interface for working with an ordered collection of elements.FlowOperations<T,
FT> The result of the evaluation of aLazyFunction
.LazyFunction<T>A lazy function is used to populate aFlow
incrementally.LazyValue<T>A function that returns a value, allowing the computation of that value to be deferred as late as possible.LazyZipValue<A,B> Mapper<S,T> Interface for operationFlow.map(Mapper)
to define how Flow elements are mapped from one type to another (or otherwise transformed).Mapper2<A,B, C> A generalization ofMapper
for a two-input function.Predicate<T>Used when filtering a collection of objects of a given type; the predicate is passed each object in turn, and returns true to include the object in the result collection.Reducer<A,T> A reducer takes an accumulator value and a single value from a collection and computes a new accumulator value.Tuple<A,B> A Tuple holds two values of two different types.Worker<T>An operational function used with aFlow
.ZippedFlow<A,B> The result of theFlow.zipWith(Flow)
method (or created from a Map viaF.zippedFlow(Map)
), a Flow of combinedTuple
values (that can be deconstructed, eventually, usingZippedFlow.unzip()
).