| Modifier and Type | Class and Description |
|---|---|
class |
ATransducer<B,C>
Abstract base class for implementing a transducer that implements
comp.
|
| Modifier and Type | Method and Description |
|---|---|
static <A,B extends Iterable<A>> |
Fns.cat()
Creates a transducer that transforms a reducing function by accepting
an iterable of the expected input type and reducing it
|
<A> ITransducer<A,C> |
ITransducer.comp(ITransducer<A,? super B> right)
Composes a transducer with another transducer, yielding
a new transducer.
|
<A> ITransducer<A,C> |
ATransducer.comp(ITransducer<A,? super B> right)
Composes a transducer with another transducer, yielding
a new transducer.
|
static <A,B,C> ITransducer<A,C> |
Fns.compose(ITransducer<B,C> left,
ITransducer<A,B> right)
Composes a transducer with another transducer, yielding a new transducer that
|
static <A> ITransducer<A,A> |
Fns.dedupe()
Creates a transducer that transforms a reducing function such that
consecutive identical input values are removed, only a single value
is processed.
|
static <A> ITransducer<A,A> |
Fns.drop(long n)
Creates a transducer that transforms a reducing function such that
it skips n inputs, then processes the rest of the inputs.
|
static <A> ITransducer<A,A> |
Fns.dropWhile(Predicate<A> p)
Creates a transducer that transforms a reducing function such that
it skips inputs as long as the provided predicate returns true.
|
static <A> ITransducer<A,A> |
Fns.filter(Predicate<A> p)
Creates a transducer that transforms a reducing function by applying a
predicate to each input and processing only those inputs for which the
predicate is true.
|
static <A> ITransducer<A,A> |
Fns.keep(Function<A,A> f)
Creates a transducer that transforms a reducing function by applying a
function to each input and processing the resulting value, ignoring values
that are null.
|
static <A> ITransducer<A,A> |
Fns.keepIndexed(BiFunction<Long,A,A> f)
Creates a transducer that transforms a reducing function by applying a
function to each input and processing the resulting value, ignoring values
that are null.
|
static <A,B> ITransducer<A,B> |
Fns.map(Function<B,A> f)
Creates a transducer that transforms a reducing function by applying a mapping
function to each input.
|
static <A,B extends Iterable<A>,C> |
Fns.mapcat(Function<C,B> f)
Creates a transducer that transforms a reducing function using
a composition of map and cat.
|
static <A> ITransducer<Iterable<A>,A> |
Fns.partitionAll(int n)
Creates a transducer that transforms a reducing function that processes
iterables of input into a reducing function that processes individual inputs
by gathering series of inputs into partitions of a given size, only forwarding
them to the next reducing function when enough inputs have been accrued.
|
static <A,P> ITransducer<Iterable<A>,A> |
Fns.partitionBy(Function<A,P> f)
Creates a transducer that transforms a reducing function that processes
iterables of input into a reducing function that processes individual inputs
by gathering series of inputs for which the provided partitioning function returns
the same value, only forwarding them to the next reducing function when the value
the partitioning function returns for a given input is different from the value
returned for the previous input.
|
static <A> ITransducer<A,A> |
Fns.randomSample(Double prob)
Creates a transducer that transforms a reducing function such that
it has the specified probability of processing each input.
|
static <A> ITransducer<A,A> |
Fns.remove(Predicate<A> p)
Creates a transducer that transforms a reducing function by applying a
predicate to each input and not processing those inputs for which the
predicate is true.
|
static <A> ITransducer<A,A> |
Fns.replace(Map<A,A> smap)
Creates a transducer that transforms a reducing function such that
inputs that are keys in the provided map are replaced by the corresponding
value in the map.
|
static <A> ITransducer<A,A> |
Fns.take(long n)
Creates a transducer that transforms a reducing function such that
it only processes n inputs, then the reducing process stops.
|
static <A> ITransducer<A,A> |
Fns.takeNth(long n)
Creates a transducer that transforms a reducing function such that
it processes every nth input.
|
static <A> ITransducer<A,A> |
Fns.takeWhile(Predicate<A> p)
Creates a transducer that transforms a reducing function such that
it processes inputs as long as the provided predicate returns true.
|
| Modifier and Type | Method and Description |
|---|---|
<A> ITransducer<A,C> |
ITransducer.comp(ITransducer<A,? super B> right)
Composes a transducer with another transducer, yielding
a new transducer.
|
<A> ITransducer<A,C> |
ATransducer.comp(ITransducer<A,? super B> right)
Composes a transducer with another transducer, yielding
a new transducer.
|
static <A,B,C> ITransducer<A,C> |
Fns.compose(ITransducer<B,C> left,
ITransducer<A,B> right)
Composes a transducer with another transducer, yielding a new transducer that
|
static <A,B,C> ITransducer<A,C> |
Fns.compose(ITransducer<B,C> left,
ITransducer<A,B> right)
Composes a transducer with another transducer, yielding a new transducer that
|
static <R extends Collection<A>,A,B> |
Fns.into(ITransducer<A,B> xf,
R init,
Iterable<B> input)
Transduces input into collection using built-in reducing function.
|
static <R,A,B> R |
Fns.transduce(ITransducer<A,B> xf,
IReducingFunction<R,? super A> rf,
Iterable<B> input)
Reduces input using transformed reducing function.
|
static <R,A,B> R |
Fns.transduce(ITransducer<A,B> xf,
IStepFunction<R,? super A> rf,
R init,
Iterable<B> input)
Reduces input using transformed reducing function.
|
Copyright © 2014. All rights reserved.