| Modifier and Type | Method and Description |
|---|---|
static <W extends Collection<Maybe<T>>,T> |
Windowing.centered(int windowSize,
Iterable<T> iterable,
Provider<W> provider)
Adapts an iterable to an iterator showing a sliding centered window of
the contained elements.
|
static <W extends Collection<Maybe<T>>,T> |
Windowing.centered(int windowSize,
Iterator<T> iterator,
Provider<W> provider)
Adapts an iterator to an iterator showing a sliding centered window of
the contained elements.
|
static <C extends Collection<Maybe<E>>,E> |
Multiplexing.unchainWithExactChannelSize(int channelSize,
Iterable<E> iterable,
Provider<C> channelProvider)
Demultiplexes elements from the source array into an iterator of
channels.
|
static <C extends Collection<Maybe<E>>,E> |
Multiplexing.unchainWithExactChannelSize(int channelSize,
Iterator<E> iterator,
Provider<C> channelProvider)
Demultiplexes elements from the source array into an iterator of
channels.
|
static <C extends Collection<Maybe<E>>,E> |
Multiplexing.unchainWithExactChannelSize(int channelSize,
Provider<C> channelProvider,
E... array)
Demultiplexes elements from the source array into an iterator of
channels.
|
| Modifier and Type | Method and Description |
|---|---|
static <T> Maybe<T> |
Options.Maybes.join(Maybe<Maybe<T>> maybe)
Conventional monad join operator.
|
static <T> Maybe<T> |
Options.Maybes.lift(T value)
Transforms a null value to Maybe.nothing, a non-null value to
Maybe.just(value)
|
static <E> Maybe<E> |
Consumers.maybeAt(long index,
E[] array)
Yields element at (0-based) position of the array if found or nothing.
|
static <E> Maybe<E> |
Consumers.maybeAt(long index,
Iterable<E> iterable)
Yields element at (0-based) position of the iterable if found or nothing.
|
static <E> Maybe<E> |
Consumers.maybeAt(long index,
Iterator<E> iterator)
Yields element at (0-based) position of the iterator if found or nothing.
|
static <E> Maybe<E> |
Consumers.maybeFirst(E[] array)
Yields the first element if present, nothing otherwise.
|
static <E> Maybe<E> |
Consumers.maybeFirst(Iterable<E> iterable)
Yields the first element if present, nothing otherwise.
|
static <E> Maybe<E> |
Consumers.maybeFirst(Iterator<E> iterator)
Yields the first element if present, nothing otherwise.
|
static <E> Maybe<E> |
Consumers.maybeLast(E[] array)
Yields the last element if present, nothing otherwise.
|
static <E> Maybe<E> |
Consumers.maybeLast(Iterable<E> iterable)
Yields the last element if present, nothing otherwise.
|
static <E> Maybe<E> |
Consumers.maybeLast(Iterator<E> iterator)
Yields the last element if present, nothing otherwise.
|
static <E> Maybe<E> |
Consumers.maybeNth(long count,
E[] array)
Yields nth (1-based) element of the array if found or nothing.
|
static <E> Maybe<E> |
Consumers.maybeNth(long count,
Iterable<E> iterable)
Yields nth (1-based) element of the iterable if found or nothing.
|
static <E> Maybe<E> |
Consumers.maybeNth(long count,
Iterator<E> iterator)
Yields nth (1-based) element of the iterator if found or nothing.
|
static <E> Maybe<E> |
Consumers.maybeOne(E[] array)
Yields the only element if found, nothing otherwise.
|
static <E> Maybe<E> |
Consumers.maybeOne(Iterable<E> iterable)
Yields the only element if found, nothing otherwise.
|
static <E> Maybe<E> |
Consumers.maybeOne(Iterator<E> iterator)
Yields the only element if found, nothing otherwise.
|
static <T> Maybe<T> |
Options.Maybes.pure(T value)
Yields Maybe.pure() of a value.
|
static <E> Maybe<E> |
Searches.searchFirst(E[] array,
Predicate<E> predicate)
Searches the first matching element returning just element if found,
nothing otherwise.
|
static <E> Maybe<E> |
Searches.searchFirst(Iterable<E> iterable,
Predicate<E> predicate)
Searches the first matching element returning just element if found,
nothing otherwise.
|
static <E> Maybe<E> |
Searches.searchFirst(Iterator<E> iterator,
Predicate<E> predicate)
Searches the first matching element returning just element if found,
nothing otherwise.
|
static <E> Maybe<E> |
Searches.searchLast(E[] array,
Predicate<E> predicate)
Searches the last matching element returning just element if found,
nothing otherwise.
|
static <E> Maybe<E> |
Searches.searchLast(Iterable<E> iterable,
Predicate<E> predicate)
Searches the last matching element returning just element if found,
nothing otherwise.
|
static <E> Maybe<E> |
Searches.searchLast(Iterator<E> iterator,
Predicate<E> predicate)
Searches the last matching element returning just element if found,
nothing otherwise.
|
static <E> Maybe<E> |
Searches.searchOne(E[] array,
Predicate<E> predicate)
Searches the only matching element returning just element if found,
nothing otherwise.
|
static <E> Maybe<E> |
Searches.searchOne(Iterable<E> iterable,
Predicate<E> predicate)
Searches the only matching element returning just element if found,
nothing otherwise.
|
static <E> Maybe<E> |
Searches.searchOne(Iterator<E> iterator,
Predicate<E> predicate)
Searches the only matching element returning just element if found,
nothing otherwise.
|
| Modifier and Type | Method and Description |
|---|---|
static <T> Iterator<List<Maybe<T>>> |
Windowing.centered(int windowSize,
Iterable<T> iterable)
Adapts an iterable to an iterator showing a sliding centered window of
the contained elements.
|
static <T> Iterator<List<Maybe<T>>> |
Windowing.centered(int windowSize,
Iterator<T> iterator)
Adapts an iterator to an iterator showing a sliding centered window of
the contained elements.
|
static <R,T> Delegate<Maybe<R>,Maybe<T>> |
Options.Maybes.lift(Delegate<R,T> delegate)
Transforms a delegate to another working on maybe monadic values.
|
static <R,T> Delegate<Maybe<R>,Maybe<T>> |
Options.Maybes.lift(Delegate<R,T> delegate)
Transforms a delegate to another working on maybe monadic values.
|
static <T> Iterator<Maybe<T>> |
Options.Maybes.lifts(Iterable<T> iterable)
Creates an iterator transforming elements from the source iterable to
Maybe.nothing when the source element is null, to
Maybe.just(sourceValue) otherwise.
|
static <T> Iterator<Maybe<T>> |
Options.Maybes.lifts(Iterator<T> iterator)
Creates an iterator transforming elements from the source iterator to
Maybe.nothing when the source element is null, to
Maybe.just(sourceValue) otherwise.
|
static <T> Iterator<Maybe<T>> |
Options.Maybes.lifts(T first,
T second)
Creates an iterator transforming passed values to Maybe.nothing when
the source element is null, to Maybe.just(sourceValue) otherwise.
|
static <T> Iterator<Maybe<T>> |
Options.Maybes.lifts(T first,
T second,
T third)
Creates an iterator transforming passed values to Maybe.nothing when
the source element is null, to Maybe.just(sourceValue) otherwise.
|
static <T1,T2> Iterator<Pair<Maybe<T1>,Maybe<T2>>> |
Zips.longest(Iterable<T1> former,
Iterable<T2> latter)
Transforms two iterables to an iterator of tuples, containing
Maybe.just(elements) of both iterables occurring at the same position.
|
static <T1,T2> Iterator<Pair<Maybe<T1>,Maybe<T2>>> |
Zips.longest(Iterable<T1> former,
Iterable<T2> latter)
Transforms two iterables to an iterator of tuples, containing
Maybe.just(elements) of both iterables occurring at the same position.
|
static <T1,T2> Iterator<Pair<Maybe<T1>,Maybe<T2>>> |
Zips.longest(Iterator<T1> former,
Iterator<T2> latter)
Transforms two iterators to an iterator of tuples, containing
Maybe.just(elements) of both iterators occurring at the same position.
|
static <T1,T2> Iterator<Pair<Maybe<T1>,Maybe<T2>>> |
Zips.longest(Iterator<T1> former,
Iterator<T2> latter)
Transforms two iterators to an iterator of tuples, containing
Maybe.just(elements) of both iterators occurring at the same position.
|
static <T1,T2> Iterator<Pair<Maybe<T1>,Maybe<T2>>> |
Zips.longest(T1[] former,
T2[] latter)
Transforms two arrays to an iterator of tuples, containing
Maybe.just(elements) of both arrays occurring at the same position.
|
static <T1,T2> Iterator<Pair<Maybe<T1>,Maybe<T2>>> |
Zips.longest(T1[] former,
T2[] latter)
Transforms two arrays to an iterator of tuples, containing
Maybe.just(elements) of both arrays occurring at the same position.
|
static <T> Provider<Maybe<T>> |
Dispatching.provider(Iterator<T> adaptee)
Adapts an iterator to a provider.
|
static <T> Iterator<Maybe<T>> |
Options.Maybes.pures(Iterable<T> values)
Creates an iterator transforming values from the source iterable into
pure() Maybe
|
static <T> Iterator<Maybe<T>> |
Options.Maybes.pures(Iterator<T> values)
Creates an iterator transforming values from the source iterator into
pure() Maybe
|
static <T> Iterator<Maybe<T>> |
Options.Maybes.pures(T... values)
Creates an iterator yielding values pure() Maybe
|
static <T> Iterator<Maybe<T>> |
Options.Maybes.pures(T value)
Creates a singleton iterator yielding pure() Maybe
|
static <T> Iterator<Maybe<T>> |
Options.Maybes.pures(T first,
T second)
Creates an iterator yielding pure() Maybe
|
static <T> Iterator<Maybe<T>> |
Options.Maybes.pures(T first,
T second,
T third)
Creates an iterator yielding pure() Maybe
|
static <E,I extends Iterator<E>> |
Multiplexing.roundrobinLongest(Iterable<I> iterable)
Multiplexes an iterable of iterators into a single iterator.
|
static <E> Iterator<Maybe<E>> |
Multiplexing.roundrobinLongest(Iterator<E> first,
Iterator<E> second)
Multiplexes two iterators into a single iterator.
|
static <E> Iterator<Maybe<E>> |
Multiplexing.roundrobinLongest(Iterator<E> first,
Iterator<E> second,
Iterator<E> third)
Multiplexes three iterators into a single iterator.
|
static <E,I extends Iterator<E>> |
Multiplexing.roundrobinLongest(Iterator<I> iterators)
Multiplexes an iterator of iterators into a single iterator.
|
static <E> Iterator<List<Maybe<E>>> |
Multiplexing.unchainWithExactChannelSize(int channelSize,
E... array)
Demultiplexes elements from the source array into an iterator of
channels.
|
static <E> Iterator<List<Maybe<E>>> |
Multiplexing.unchainWithExactChannelSize(int channelSize,
Iterable<E> iterable)
Demultiplexes elements from the source array into an iterator of
channels.
|
static <E> Iterator<List<Maybe<E>>> |
Multiplexing.unchainWithExactChannelSize(int channelSize,
Iterator<E> iterator)
Demultiplexes elements from the source array into an iterator of
channels.
|
| Modifier and Type | Method and Description |
|---|---|
static <T> T |
Options.Maybes.drop(Maybe<T> maybe)
Transforms a Maybe.nothing to null, a Maybe.just to the wrapped
value.
|
static <T> Iterator<T> |
Options.Maybes.drops(Maybe<T> first,
Maybe<T> second)
Creates an iterator transformed passed elements such as the become
null when the source element is Nothing, the wrapped value otherwise.
|
static <T> Iterator<T> |
Options.Maybes.drops(Maybe<T> first,
Maybe<T> second)
Creates an iterator transformed passed elements such as the become
null when the source element is Nothing, the wrapped value otherwise.
|
static <T> Iterator<T> |
Options.Maybes.drops(Maybe<T> first,
Maybe<T> second,
Maybe<T> third)
Creates an iterator transformed passed elements such as the become
null when the source element is Nothing, the wrapped value otherwise.
|
static <T> Iterator<T> |
Options.Maybes.drops(Maybe<T> first,
Maybe<T> second,
Maybe<T> third)
Creates an iterator transformed passed elements such as the become
null when the source element is Nothing, the wrapped value otherwise.
|
static <T> Iterator<T> |
Options.Maybes.drops(Maybe<T> first,
Maybe<T> second,
Maybe<T> third)
Creates an iterator transformed passed elements such as the become
null when the source element is Nothing, the wrapped value otherwise.
|
static <T> Maybe<T> |
Options.Maybes.join(Maybe<Maybe<T>> maybe)
Conventional monad join operator.
|
static <T> Iterator<T> |
Options.Maybes.justs(Maybe<T> first,
Maybe<T> second)
Filters nothings out of an array of Maybe T, returning an Iterator of
T.
|
static <T> Iterator<T> |
Options.Maybes.justs(Maybe<T> first,
Maybe<T> second)
Filters nothings out of an array of Maybe T, returning an Iterator of
T.
|
static <T> Iterator<T> |
Options.Maybes.justs(Maybe<T> first,
Maybe<T> second,
Maybe<T> third)
Filters nothings out of an array of Maybe T, returning an Iterator of
T.
|
static <T> Iterator<T> |
Options.Maybes.justs(Maybe<T> first,
Maybe<T> second,
Maybe<T> third)
Filters nothings out of an array of Maybe T, returning an Iterator of
T.
|
static <T> Iterator<T> |
Options.Maybes.justs(Maybe<T> first,
Maybe<T> second,
Maybe<T> third)
Filters nothings out of an array of Maybe T, returning an Iterator of
T.
|
| Modifier and Type | Method and Description |
|---|---|
static <T> Iterator<T> |
Options.Maybes.drops(Iterable<Maybe<T>> iterable)
Creates an iterator transforming Maybes from the source iterable to
null when the source element is Nothing, to the wrapped value
otherwise.
|
static <T> Iterator<T> |
Options.Maybes.drops(Iterator<Maybe<T>> iterator)
Creates an iterator transforming Maybes from the source iterator to
null when the source element is Nothing, to the wrapped value
otherwise.
|
static <T> Maybe<T> |
Options.Maybes.join(Maybe<Maybe<T>> maybe)
Conventional monad join operator.
|
static <T> Iterator<T> |
Options.Maybes.justs(Iterable<Maybe<T>> maybes)
Filters nothings out of an Iterable of Maybe T, returning an Iterator
of T.
|
static <T> Iterator<T> |
Options.Maybes.justs(Iterator<Maybe<T>> maybes)
Filters nothings out of an Iterator of Maybe T, returning an Iterator
of T.
|
| Modifier and Type | Method and Description |
|---|---|
Maybe<E> |
MaybeLastElement.perform(Iterator<E> iterator) |
Maybe<E> |
MaybeOneElement.perform(Iterator<E> consumable) |
Maybe<E> |
MaybeFirstElement.perform(Iterator<E> consumable) |
| Modifier and Type | Method and Description |
|---|---|
Pair<Maybe<E1>,Maybe<E2>> |
ZipLongestIterator.next()
iterating over the longest iterator gives a Pair of Maybe.nothing
indefinitely "no matter how many times you try, you can't shoot the dog"
|
Pair<Maybe<E1>,Maybe<E2>> |
ZipLongestIterator.next()
iterating over the longest iterator gives a Pair of Maybe.nothing
indefinitely "no matter how many times you try, you can't shoot the dog"
|
| Modifier and Type | Method and Description |
|---|---|
Maybe<T> |
IteratingProvider.provide() |
| Modifier and Type | Class and Description |
|---|---|
class |
UnchainWithExactChannelSizeIterator<C extends Collection<Maybe<T>>,T>
squared
|
| Modifier and Type | Method and Description |
|---|---|
Maybe<E> |
RoundrobinLongestIterator.next() |
| Constructor and Description |
|---|
UnchainIterator(Provider<Maybe<Integer>> channelsSizesProvider,
Iterator<T> iterator,
Provider<C> channelProvider) |
UnchainWithExactChannelSizeIterator(Provider<Maybe<Integer>> channelsSizesProvider,
Iterator<T> iterator,
Provider<C> channelProvider) |
| Modifier and Type | Method and Description |
|---|---|
<T> Maybe<T> |
Maybe.fmap(Delegate<T,E> delegate) |
static <E> Maybe<E> |
Maybe.just(E element) |
Maybe<RT> |
Either.maybe() |
Maybe<E> |
MaybeIterator.next()
calling next over the boundary of the contained iterator leads
Maybe.nothing indefinitely "no matter how many times you try, you can't
shoot the dog"
|
static <E> Maybe<E> |
Maybe.nothing() |
Maybe<R> |
MaybeRight.perform(Either<L,R> either) |
Maybe<L> |
MaybeLeft.perform(Either<L,R> either) |
Maybe<RT> |
EitherToMaybe.perform(Either<LT,RT> either) |
Maybe<R> |
FmapMaybe.perform(Maybe<T> from) |
Maybe<T> |
LiftMaybe.perform(T valueOrNull) |
Maybe<T> |
PureMaybe.perform(T value) |
Maybe<T> |
Box.unload() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
IsJust.accept(Maybe<T> element) |
boolean |
IsNothing.accept(Maybe<T> element) |
Either<L,R> |
MaybeToEither.perform(Maybe<R> maybe) |
T |
FromJust.perform(Maybe<T> element) |
T |
DropMaybe.perform(Maybe<T> maybe) |
Maybe<R> |
FmapMaybe.perform(Maybe<T> from) |
T |
MaybeOrElse.perform(Maybe<T> maybe,
T otherwise) |
| Constructor and Description |
|---|
Either(Maybe<LT> left,
Maybe<RT> right) |
Either(Maybe<LT> left,
Maybe<RT> right) |
| Modifier and Type | Method and Description |
|---|---|
Maybe<BigInteger> |
NextBigIntegerSequencingPolicy.next(BigInteger element) |
Maybe<Inet4Address> |
NextInetAddressSequencingPolicy.next(Inet4Address element) |
Maybe<Integer> |
NextIntegerSequencingPolicy.next(Integer element) |
Maybe<Long> |
NextLongSequencingPolicy.next(Long element) |
Maybe<T> |
PeriodicSequencingPolicy.next(T element) |
Maybe<T> |
SequencingPolicy.next(T element) |
| Modifier and Type | Method and Description |
|---|---|
int |
JustBeforeNothingComparator.compare(Maybe<T> lhs,
Maybe<T> rhs) |
int |
JustBeforeNothingComparator.compare(Maybe<T> lhs,
Maybe<T> rhs) |
| Modifier and Type | Method and Description |
|---|---|
Maybe<T> |
SparseRange.end() |
Maybe<T> |
Range.end() |
Maybe<T> |
DenseRange.end() |
| Constructor and Description |
|---|
DenseRange(SequencingPolicy<T> sequencer,
Comparator<Maybe<T>> comparator,
Range.Endpoint left,
T lower,
Maybe<T> upper,
Range.Endpoint right) |
RangeIterator(SequencingPolicy<T> policy,
Comparator<Maybe<T>> comparator,
T begin,
Maybe<T> end) |
| Modifier and Type | Method and Description |
|---|---|
Maybe<Short> |
ShortTryParser.perform(String parsee) |
Maybe<Float> |
FloatTryParser.perform(String parsee) |
Maybe<Long> |
LongTryParser.perform(String parsee) |
Maybe<Double> |
DoubleTryParser.perform(String parsee) |
Maybe<Byte> |
ByteTryParser.perform(String parsee) |
Maybe<Boolean> |
BooleanTryParser.perform(String parsee) |
Maybe<Integer> |
IntegerTryParser.perform(String parsee) |
| Modifier and Type | Class and Description |
|---|---|
class |
CenteredWindowIterator<W extends Collection<Maybe<T>>,T>
[1,2,3,4,5], 3 -> (-,1,2), (1,2,3), (2,3,4), (3,4,5), (4,5,-)
|
Copyright © 2012. All Rights Reserved.