A B C E F G H I L M N O P R S T V 

A

accept(T) - Method in interface almost.functional.Consumer
Performs this operation on the given argument.
addCompletedConsumer(Consumer<Boolean>...) - Method in class almost.functional.reactive.BroadcastObserver
Add multiple completed Consumers to this observer.
addErrorConsumer(Consumer<Throwable>...) - Method in class almost.functional.reactive.BroadcastObserver
Add multiple error Consumers to this observer.
addNextConsumer(Consumer<T>...) - Method in class almost.functional.reactive.BroadcastObserver
Add multiple next Consumers to this observer.
allMatch(Predicate<? super T>) - Method in class almost.functional.utils.Stream
Returns whether all elements of this stream match the provided predicate.
almost.functional - package almost.functional
Functional classes and interfaces of Almost Functional.
almost.functional.reactive - package almost.functional.reactive
Package includes rudimentary reactive style code.
almost.functional.utils - package almost.functional.utils
Utility classes and functions in support of the functional aspects of Almost Functional.
and(Predicate<? super T>, Predicate<? super T>) - Static method in class almost.functional.Predicates
Create a predicate which is a logical and of two existing predicate.
any(Iterable<T>, Predicate<? super T>) - Static method in class almost.functional.utils.Iterables
Determine if any element of an iterable matches a given predicate.
anyMatch(Predicate<? super T>) - Method in class almost.functional.utils.Stream
Returns whether any elements of this stream match the provided predicate.
apply(F, S) - Method in interface almost.functional.BiFunction
Apply the function to the first and second argument and return a result.
apply(A) - Method in interface almost.functional.Function
Applies this function to the given argument.
ArrayIterable<T> - Class in almost.functional.utils
An iterable over an array.
ArrayIterable(T...) - Constructor for class almost.functional.utils.ArrayIterable
Basic constructor.
ArrayIterable.ArrayIterator<D> - Class in almost.functional.utils
 
ArrayIterable.ArrayIterator(D...) - Constructor for class almost.functional.utils.ArrayIterable.ArrayIterator
 

B

BiFunction<F,S,R> - Interface in almost.functional
An interface of a function that accepts a first and second argument and returns a result.
BroadcastObserver<T> - Class in almost.functional.reactive
A single Observer that allow for multiple Observers to observe a single event.
BroadcastObserver() - Constructor for class almost.functional.reactive.BroadcastObserver
 
BroadcastObserver(Optional<? extends Consumer<T>>, Optional<? extends Consumer<Throwable>>, Optional<? extends Consumer<Boolean>>) - Constructor for class almost.functional.reactive.BroadcastObserver
 

C

checkNonEmptyString(String, String) - Static method in class almost.functional.utils.Preconditions
Check that a String is not empty after removing whitespace.
checkNotNull(T, String) - Static method in class almost.functional.utils.Preconditions
Check that a reference is not null, throwing a IllegalArgumentException if it is.
close() - Method in class almost.functional.utils.Stream
 
collect(Iterator<T>) - Static method in class almost.functional.utils.Iterators
Collect an iterator's elements into a List.
completed(Boolean) - Method in class almost.functional.reactive.BroadcastObserver
 
completed(Boolean) - Method in interface almost.functional.reactive.Observer
Observe the completion.
concat(Iterator<? extends T>...) - Static method in class almost.functional.utils.Iterators
Create an iterator which sequentially iterates over a collection of iterators.
concat(Stream<? extends T>, Stream<? extends T>) - Static method in class almost.functional.utils.Stream
Creates a concatenated stream whose elements are all the elements of the first stream followed by all the elements of the second stream.
Consumer<T> - Interface in almost.functional
A functional interface that consumes, without results, an argument.
contains(Iterable<T>) - Static method in class almost.functional.Predicates
Returns a predicate that that tests if an iterable contains an argument.
contains(Iterable<T>, T) - Static method in class almost.functional.utils.Iterables
Does an iterable contain a value as determined by Object.isEqual(Object, Object).
count() - Method in class almost.functional.utils.Stream
The element count in the stream.

E

empty() - Static method in class almost.functional.Optional
Returns an empty Optional instance.
error(Throwable) - Method in class almost.functional.reactive.BroadcastObserver
 
error(Throwable) - Method in interface almost.functional.reactive.Observer
Observe an error that occurred.

F

filter(Predicate<? super T>) - Method in class almost.functional.Optional
Apply a predicate to the optional, if the optional is present, and the predicate is true, return the optional, otherwise return empty.
filter(Iterable<T>, Predicate<? super T>) - Static method in class almost.functional.utils.Iterables
Create an iterable that filters an existing iterable based on a predicate.
filter(Predicate<? super T>) - Method in class almost.functional.utils.Stream
Returns a stream consisting of the elements of this stream that match the given predicate.
find(Iterable<? extends T>, Predicate<? super T>) - Static method in class almost.functional.utils.Iterables
Apply a predicate to an iterable, returning an optional of the first element where the predicate is true, or empty if no true is found.
forEach(Iterable<T>, Consumer<? super T>) - Static method in class almost.functional.utils.Iterables
Accept a consumer for each element of an iterable.
forEach(Consumer<? super T>) - Method in class almost.functional.utils.Stream
Performs an action for each element of this stream.
Function<A,R> - Interface in almost.functional
A functional interface and can be used to apply a function to a type and yield a result.

G

get() - Method in class almost.functional.Optional
If a value is present in this Optional, returns the value, otherwise throws NoSuchElementException.
get() - Method in interface almost.functional.Supplier
Get the result.
get(Iterable<E>, int) - Static method in class almost.functional.utils.Iterables
Return an optional of an element from a specified position in an iterable.
getLogger() - Static method in class almost.functional.utils.LogFactory
Returns a Logger named after the callers class.
getLogger(String) - Static method in class almost.functional.utils.LogFactory
Return a instance of Logger with a given name.
getState() - Method in class almost.functional.reactive.Promise
Get the current state of this promise.

H

hasNext() - Method in class almost.functional.utils.ArrayIterable.ArrayIterator
 

I

ifPresent(Consumer<? super T>) - Method in class almost.functional.Optional
If a value is present, invoke the specified consumer with the value, otherwise do nothing.
ImmutableIterator<E> - Class in almost.functional.utils
Iterator that does not support remove, making it immutable.
ImmutableIterator() - Constructor for class almost.functional.utils.ImmutableIterator
 
isAssignableTo(Class<?>, Class<?>, String) - Static method in class almost.functional.utils.Preconditions
Check that one class is assignable to another.
isEqual(T) - Static method in class almost.functional.Predicates
Returns a predicate that tests if two arguments are equal according to Objects.equals(Object, Object).
isPresent() - Method in class almost.functional.Optional
Return true if there is a value present, otherwise false.
iterable(Enumeration<E>) - Static method in class almost.functional.utils.Iterables
Convert an enumeration to an iterator.
Iterables - Class in almost.functional.utils
Utility operations on an iterable.
iterator() - Method in class almost.functional.utils.ArrayIterable
 
iterator() - Method in class almost.functional.utils.SupplierIterable
 
Iterators - Class in almost.functional.utils
Utility class for Iterators.

L

last(Iterable<E>) - Static method in class almost.functional.utils.Iterables
Return the last element of an iterable, or empty if the iterable is empty.
LogFactory - Class in almost.functional.utils
Provide consistently named instances of Logger.

M

makeImmutable(Iterator<E>) - Static method in class almost.functional.utils.ImmutableIterator
Make an iterator immutable.
map(Function<T, V>) - Method in class almost.functional.Optional
If a value is present, map is with function, and if the result is non-null, return an Optional describing the result.
map(Iterable<F>, Function<? super F, ? extends T>) - Static method in class almost.functional.utils.Iterables
Create an iterable that maps an existing iterable to a new one by applying a function to each of it's elements.
map(Function<? super T, ? extends R>) - Method in class almost.functional.utils.Stream
Returns a stream consisting of the results of applying the given function to the elements of this stream.

N

negate(Predicate<? super T>) - Static method in class almost.functional.Predicates
Negate an existing predicate's test result.
newIterable(T...) - Static method in class almost.functional.utils.ArrayIterable
Factory function to create an iterable over an array of T.
next(T) - Method in class almost.functional.reactive.BroadcastObserver
 
next(T) - Method in interface almost.functional.reactive.Observer
Observe each data item made available.
next() - Method in class almost.functional.utils.ArrayIterable.ArrayIterator
 
next(Iterator<? extends T>, int) - Static method in class almost.functional.utils.Iterators
This returns an Iterator limited to no more then the next count elements.
noneMatch(Predicate<? super T>) - Method in class almost.functional.utils.Stream
Returns whether no elements of this stream match the provided predicate.
notEmptyString() - Static method in class almost.functional.Predicates
Predicate to check that a String is not empty, i.e.
notNull() - Static method in class almost.functional.Predicates
Predicate to check that a value is not null.

O

Observer<T> - Interface in almost.functional.reactive
An Observer implementation that observes data, errors, and the completion of what is being observed.
of(T) - Static method in class almost.functional.Optional
Returns an Optional with the specified present non-null value.
of(Iterable<R>) - Static method in class almost.functional.utils.Stream
Create a new stream of the elements that the iterable.iterator() will yield
of(R...) - Static method in class almost.functional.utils.Stream
Create a stream of the elements provided.
of(Iterator<R>) - Static method in class almost.functional.utils.Stream
Create a stream based on an iterator.
ofNullable(T) - Static method in class almost.functional.Optional
Returns an Optional of a value which might be null.
onClose(Runnable) - Method in class almost.functional.utils.Stream
Add Runnables to run when the stream closes.
Optional<T> - Class in almost.functional
A container object which may or may not contain a non-null value.
or(Predicate<? super T>, Predicate<? super T>) - Static method in class almost.functional.Predicates
Create a predicate which is a logical or of two existing predicate.
orElse(T) - Method in class almost.functional.Optional
Return the value if present, otherwise return other.
orElseRun(Runnable) - Method in class almost.functional.Optional
If the optional is empty run the Runnable.
orElseSupplier(Supplier<T>) - Method in class almost.functional.Optional
Return the value if present, otherwise get the value from the Supplier.
orElseThrow(String) - Method in class almost.functional.Optional
If optional is not empty return it's value, if empty throw a NoSuchElementException with message.

P

parallelBatch(Iterator<? extends T>, Consumer<Iterator<? extends T>>, int) - Static method in class almost.functional.utils.Iterators
Break an iterator's elements into batches, and invoke the consumer on these batches in a thread pool.
precondition(T, Predicate<T>, Class<? extends RuntimeException>, String) - Static method in class almost.functional.utils.Preconditions
Test a Predicate against a reference value, and if it fails throw a runtime exception with a message.
Preconditions - Class in almost.functional.utils
Utility operations designed to be used as precondition tests.
Predicate<T> - Interface in almost.functional
A functional interface that can be used to indicate a boolean test is to be applied to some type.
Predicates - Class in almost.functional
Utility operations on predicates.
Promise<T> - Class in almost.functional.reactive
A Promise is a composite of a Supplier and an Observer allowing for observation or the supplier.
Promise(Supplier<T>, Observer<T>) - Constructor for class almost.functional.reactive.Promise
Create a Promise based on a given supplier and with an Observer.
Promise.State - Enum in almost.functional.reactive
The current state of the promise.
propagate(Throwable) - Static method in class almost.functional.utils.Throwables
Propagate a Throwable as a RuntimeException.

R

reduce(Iterable<T>, R, BiFunction<R, ? super T, R>) - Static method in class almost.functional.utils.Iterables
Perform a reduction of an iterable, using an initial value, and a two argument function.
reduce(BiFunction<T, ? super T, T>) - Method in class almost.functional.utils.Stream
Performs a reduction on the elements of the stream, using an accumulation function, and returns an Optional describing the reduced value, if any.
reduce(R, BiFunction<R, ? super T, R>) - Method in class almost.functional.utils.Stream
Performs a reduction on the elements of this stream, using the provided initial value and accumulation functions.
remove() - Method in class almost.functional.utils.ImmutableIterator
 
run() - Method in class almost.functional.reactive.Promise
This method calls the supplier and on successful completion informs the fulfilled consumers of the return value.

S

Stream<T> - Class in almost.functional.utils
A sequence of elements supporting sequential aggregate operations.
Supplier<T> - Interface in almost.functional
A supplier of results.
SupplierIterable<T> - Class in almost.functional.utils
Creates an immutable Iterable from any Supplier of Optionals.
SupplierIterable(Supplier<Optional<T>>) - Constructor for class almost.functional.utils.SupplierIterable
Constructor accepting the Supplier.

T

test(T) - Method in interface almost.functional.Predicate
Evaluates this predicate on the given argument.
Throwables - Class in almost.functional.utils
 

V

valueOf(String) - Static method in enum almost.functional.reactive.Promise.State
Returns the enum constant of this type with the specified name.
values() - Static method in enum almost.functional.reactive.Promise.State
Returns an array containing the constants of this enum type, in the order they are declared.
A B C E F G H I L M N O P R S T V