Index
All Classes|All Packages|Serialized Form
E
- EmptyNonNull<T> - Record Class in io.foxcapades.lib.opt.impl
-
Singleton type representing an empty option.
- EmptyNonNull() - Constructor for record class io.foxcapades.lib.opt.impl.EmptyNonNull
-
Creates an instance of a
EmptyNonNullrecord class. - EmptyNullable<T> - Record Class in io.foxcapades.lib.opt.impl
-
Singleton type representing an empty option.
- EmptyNullable() - Constructor for record class io.foxcapades.lib.opt.impl.EmptyNullable
-
Creates an instance of a
EmptyNullablerecord class. - equals(Object) - Method in record class io.foxcapades.lib.opt.impl.EmptyNonNull
-
Indicates whether some other object is "equal to" this one.
- equals(Object) - Method in record class io.foxcapades.lib.opt.impl.EmptyNullable
-
Indicates whether some other object is "equal to" this one.
- equals(Object) - Method in record class io.foxcapades.lib.opt.impl.NullOption
-
Indicates whether some other object is "equal to" this one.
F
- filter(Predicate<? super T>) - Method in record class io.foxcapades.lib.opt.impl.EmptyNonNull
- filter(Predicate<? super T>) - Method in record class io.foxcapades.lib.opt.impl.EmptyNullable
- filter(Predicate<? super T>) - Method in class io.foxcapades.lib.opt.impl.FullNonNullOption
- filter(Predicate<? super T>) - Method in class io.foxcapades.lib.opt.impl.FullNullableOption
- filter(Predicate<? super T>) - Method in record class io.foxcapades.lib.opt.impl.NullOption
- filter(Predicate<? super T>) - Method in interface io.foxcapades.lib.opt.NonNullOption
-
Calls the given
Predicateon the value wrapped by thisOption, if thisOptionis not empty. - filter(Predicate<? super T>) - Method in interface io.foxcapades.lib.opt.NullableOption
-
Calls the given
Predicateon the value wrapped by thisOption, if thisOptionis not empty. - filter(Predicate<? super T>) - Method in interface io.foxcapades.lib.opt.Option
-
Calls the given
Predicateon the value wrapped by thisOption, if thisOptionis not empty. - flatMap(Function<? super T, ? extends Option<? extends R>>) - Method in record class io.foxcapades.lib.opt.impl.EmptyNonNull
- flatMap(Function<? super T, ? extends Option<? extends R>>) - Method in record class io.foxcapades.lib.opt.impl.EmptyNullable
- flatMap(Function<? super T, ? extends Option<? extends R>>) - Method in class io.foxcapades.lib.opt.impl.FullOption
- flatMap(Function<? super T, ? extends Option<? extends R>>) - Method in record class io.foxcapades.lib.opt.impl.NullOption
- flatMap(Function<? super T, ? extends Option<? extends R>>) - Method in interface io.foxcapades.lib.opt.NonNullOption
-
Calls the given
Functionif thisOptionis not empty. - flatMap(Function<? super T, ? extends Option<? extends R>>) - Method in interface io.foxcapades.lib.opt.NullableOption
-
Calls the given
Functionif thisOptionis not empty. - flatMap(Function<? super T, ? extends Option<? extends R>>) - Method in interface io.foxcapades.lib.opt.Option
-
Calls the given
Functionif thisOptionis not empty. - flatMap(Function<? super T, ? extends Option<? extends R>>, Supplier<? extends Option<? extends R>>) - Method in record class io.foxcapades.lib.opt.impl.EmptyNonNull
- flatMap(Function<? super T, ? extends Option<? extends R>>, Supplier<? extends Option<? extends R>>) - Method in record class io.foxcapades.lib.opt.impl.EmptyNullable
- flatMap(Function<? super T, ? extends Option<? extends R>>, Supplier<? extends Option<? extends R>>) - Method in class io.foxcapades.lib.opt.impl.FullOption
- flatMap(Function<? super T, ? extends Option<? extends R>>, Supplier<? extends Option<? extends R>>) - Method in record class io.foxcapades.lib.opt.impl.NullOption
- flatMap(Function<? super T, ? extends Option<? extends R>>, Supplier<? extends Option<? extends R>>) - Method in interface io.foxcapades.lib.opt.NonNullOption
-
Calls the given mapping
FunctionifPresentif thisOptionis not empty, otherwise calls the givenSupplierifEmpty. - flatMap(Function<? super T, ? extends Option<? extends R>>, Supplier<? extends Option<? extends R>>) - Method in interface io.foxcapades.lib.opt.NullableOption
-
Calls the given mapping
FunctionifPresentif thisOptionis not empty, otherwise calls the givenSupplierifEmpty. - flatMap(Function<? super T, ? extends Option<? extends R>>, Supplier<? extends Option<? extends R>>) - Method in interface io.foxcapades.lib.opt.Option
-
Calls the given mapping
FunctionifPresentif thisOptionis not empty, otherwise calls the givenSupplierifEmpty. - foxcapades.lib.opt - module foxcapades.lib.opt
- FullNonNullOption<T> - Class in io.foxcapades.lib.opt.impl
-
Non-Empty Non-Null Option.
- FullNonNullOption(T) - Constructor for class io.foxcapades.lib.opt.impl.FullNonNullOption
-
Constructs a new non-empty option wrapping a non-null value.
- FullNullableOption<T> - Class in io.foxcapades.lib.opt.impl
-
Non-Empty Nullable Option
- FullNullableOption(T) - Constructor for class io.foxcapades.lib.opt.impl.FullNullableOption
-
Constructs a new option instance wrapping the given nullable value.
- FullOption<T,I extends Option<T>> - Class in io.foxcapades.lib.opt.impl
-
Base implementation of a non-empty option.
- FullOption(T) - Constructor for class io.foxcapades.lib.opt.impl.FullOption
-
Constructs a new option instance wrapping the given value.
G
- getOption() - Method in exception io.foxcapades.lib.opt.UnwrapException
-
Returns the
Optioninstance where the exception originated.
H
- hashCode() - Method in record class io.foxcapades.lib.opt.impl.EmptyNonNull
-
Returns a hash code value for this object.
- hashCode() - Method in record class io.foxcapades.lib.opt.impl.EmptyNullable
-
Returns a hash code value for this object.
- hashCode() - Method in record class io.foxcapades.lib.opt.impl.NullOption
-
Returns a hash code value for this object.
I
- ifEmpty(Runnable) - Method in record class io.foxcapades.lib.opt.impl.EmptyNonNull
- ifEmpty(Runnable) - Method in record class io.foxcapades.lib.opt.impl.EmptyNullable
- ifEmpty(Runnable) - Method in class io.foxcapades.lib.opt.impl.FullOption
- ifEmpty(Runnable) - Method in record class io.foxcapades.lib.opt.impl.NullOption
- ifEmpty(Runnable) - Method in interface io.foxcapades.lib.opt.NonNullOption
-
Executes the given
Runnableif and only if thisOptionis empty. - ifEmpty(Runnable) - Method in interface io.foxcapades.lib.opt.NullableOption
-
Executes the given
Runnableif and only if thisOptionis empty. - ifEmpty(Runnable) - Method in interface io.foxcapades.lib.opt.Option
-
Executes the given
Runnableif and only if thisOptionis empty. - ifPresent(Consumer<? super T>) - Method in record class io.foxcapades.lib.opt.impl.EmptyNonNull
- ifPresent(Consumer<? super T>) - Method in record class io.foxcapades.lib.opt.impl.EmptyNullable
- ifPresent(Consumer<? super T>) - Method in class io.foxcapades.lib.opt.impl.FullOption
- ifPresent(Consumer<? super T>) - Method in record class io.foxcapades.lib.opt.impl.NullOption
- ifPresent(Consumer<? super T>) - Method in interface io.foxcapades.lib.opt.NonNullOption
-
Executes the given
Consumerwith the value wrapped by thisOptionif thisOptionis not empty. - ifPresent(Consumer<? super T>) - Method in interface io.foxcapades.lib.opt.NullableOption
-
Executes the given
Consumerwith the value wrapped by thisOptionif thisOptionis not empty. - ifPresent(Consumer<? super T>) - Method in interface io.foxcapades.lib.opt.Option
-
Executes the given
Consumerwith the value wrapped by thisOptionif thisOptionis not empty. - instance() - Static method in record class io.foxcapades.lib.opt.impl.EmptyNonNull
-
Returns the singleton
EmptyNonNullinstance. - instance() - Static method in record class io.foxcapades.lib.opt.impl.EmptyNullable
-
Returns the singleton
EmptyNullableinstance. - instance() - Static method in record class io.foxcapades.lib.opt.impl.NullOption
-
Returns the singleton
NullOptioninstance. - io.foxcapades.lib.opt - package io.foxcapades.lib.opt
- io.foxcapades.lib.opt.impl - package io.foxcapades.lib.opt.impl
- isEmpty() - Method in record class io.foxcapades.lib.opt.impl.EmptyNonNull
- isEmpty() - Method in record class io.foxcapades.lib.opt.impl.EmptyNullable
- isEmpty() - Method in class io.foxcapades.lib.opt.impl.FullOption
- isEmpty() - Method in record class io.foxcapades.lib.opt.impl.NullOption
- isEmpty() - Method in interface io.foxcapades.lib.opt.NonNullOption
-
Tests whether this
Optiondoes not contain a value. - isEmpty() - Method in interface io.foxcapades.lib.opt.NullableOption
-
Tests whether this
Optiondoes not contain a value. - isEmpty() - Method in interface io.foxcapades.lib.opt.Option
-
Tests whether this
Optiondoes not contain a value. - isNull() - Method in record class io.foxcapades.lib.opt.impl.EmptyNullable
- isNull() - Method in class io.foxcapades.lib.opt.impl.FullNullableOption
- isNull() - Method in record class io.foxcapades.lib.opt.impl.NullOption
- isNull() - Method in interface io.foxcapades.lib.opt.NullableOption
-
Tests whether the wrapped value is
null. - isPresent() - Method in record class io.foxcapades.lib.opt.impl.EmptyNonNull
- isPresent() - Method in record class io.foxcapades.lib.opt.impl.EmptyNullable
- isPresent() - Method in class io.foxcapades.lib.opt.impl.FullOption
- isPresent() - Method in record class io.foxcapades.lib.opt.impl.NullOption
- isPresent() - Method in interface io.foxcapades.lib.opt.NonNullOption
-
Tests whether this
Optioncontains a value. - isPresent() - Method in interface io.foxcapades.lib.opt.NullableOption
-
Tests whether this
Optioncontains a value. - isPresent() - Method in interface io.foxcapades.lib.opt.Option
-
Tests whether this
Optioncontains a value.
M
- map(Function<? super T, ? extends R>) - Method in record class io.foxcapades.lib.opt.impl.EmptyNonNull
- map(Function<? super T, ? extends R>) - Method in record class io.foxcapades.lib.opt.impl.EmptyNullable
- map(Function<? super T, ? extends R>) - Method in class io.foxcapades.lib.opt.impl.FullNonNullOption
- map(Function<? super T, ? extends R>) - Method in class io.foxcapades.lib.opt.impl.FullNullableOption
- map(Function<? super T, ? extends R>) - Method in record class io.foxcapades.lib.opt.impl.NullOption
- map(Function<? super T, ? extends R>) - Method in interface io.foxcapades.lib.opt.NonNullOption
-
Calls the given
Functionon the value wrapped by thisOptionif and only if thisOptionis not empty. - map(Function<? super T, ? extends R>) - Method in interface io.foxcapades.lib.opt.NullableOption
-
Calls the given
Functionon the value wrapped by thisOptionif and only if thisOptionis not empty. - map(Function<? super T, ? extends R>) - Method in interface io.foxcapades.lib.opt.Option
-
Calls the given
Functionon the value wrapped by thisOptionif and only if thisOptionis not empty. - map(Function<? super T, ? extends R>, Supplier<? extends R>) - Method in record class io.foxcapades.lib.opt.impl.EmptyNonNull
- map(Function<? super T, ? extends R>, Supplier<? extends R>) - Method in record class io.foxcapades.lib.opt.impl.EmptyNullable
- map(Function<? super T, ? extends R>, Supplier<? extends R>) - Method in class io.foxcapades.lib.opt.impl.FullNonNullOption
- map(Function<? super T, ? extends R>, Supplier<? extends R>) - Method in class io.foxcapades.lib.opt.impl.FullNullableOption
- map(Function<? super T, ? extends R>, Supplier<? extends R>) - Method in record class io.foxcapades.lib.opt.impl.NullOption
- map(Function<? super T, ? extends R>, Supplier<? extends R>) - Method in interface io.foxcapades.lib.opt.NonNullOption
-
Calls the given
FunctionifPresentif thisOptionis not empty, otherwise calls the givenSupplierifEmpty. - map(Function<? super T, ? extends R>, Supplier<? extends R>) - Method in interface io.foxcapades.lib.opt.NullableOption
-
Calls the given
FunctionifPresentif thisOptionis not empty, otherwise calls the givenSupplierifEmpty. - map(Function<? super T, ? extends R>, Supplier<? extends R>) - Method in interface io.foxcapades.lib.opt.Option
-
Calls the given
FunctionifPresentif thisOptionis not empty, otherwise calls the givenSupplierifEmpty.
N
- newNonNull() - Method in class io.foxcapades.lib.opt.Opt
-
Constructs a new, empty option.
- newNonNull(T) - Method in class io.foxcapades.lib.opt.Opt
-
Constructs a new, non-empty option wrapping the given value.
- newNonNullOfNullable(T) - Method in class io.foxcapades.lib.opt.Opt
-
Constructs a new option that is empty if the given input is
null, or wrapping the given value if it is notnull. - newNullable() - Method in class io.foxcapades.lib.opt.Opt
-
Constructs a new, empty option.
- newNullable(T) - Method in class io.foxcapades.lib.opt.Opt
-
Constructs a new, non-empty option wrapping the given nullable value.
- nonNull() - Static method in class io.foxcapades.lib.opt.Opt
-
Constructs a new, empty option.
- nonNull(T) - Static method in class io.foxcapades.lib.opt.Opt
-
Constructs a new, non-empty option wrapping the given value.
- nonNullOfNullable(T) - Static method in class io.foxcapades.lib.opt.Opt
-
Constructs a new option that is empty if the given input is
null, or wrapping the given value if it is notnull. - NonNullOption<T> - Interface in io.foxcapades.lib.opt
-
Non-Null Option
- nullable() - Static method in class io.foxcapades.lib.opt.Opt
-
Constructs a new, empty option.
- nullable(T) - Static method in class io.foxcapades.lib.opt.Opt
-
Constructs a new, non-empty option wrapping the given nullable value.
- NullableOption<T> - Interface in io.foxcapades.lib.opt
-
Nullable Option
NullableOptionrepresents and immutable wraps a single, nullable value that may or may not exist. - NullOption<T> - Record Class in io.foxcapades.lib.opt.impl
-
Singleton type representing a
nulloption. - NullOption() - Constructor for record class io.foxcapades.lib.opt.impl.NullOption
-
Creates an instance of a
NullOptionrecord class.
O
- Opt - Class in io.foxcapades.lib.opt
-
Option factory.
- Opt() - Constructor for class io.foxcapades.lib.opt.Opt
- Option<T> - Interface in io.foxcapades.lib.opt
-
Option
- or(T) - Method in record class io.foxcapades.lib.opt.impl.EmptyNonNull
- or(T) - Method in record class io.foxcapades.lib.opt.impl.EmptyNullable
- or(T) - Method in class io.foxcapades.lib.opt.impl.FullOption
- or(T) - Method in record class io.foxcapades.lib.opt.impl.NullOption
- or(T) - Method in interface io.foxcapades.lib.opt.NonNullOption
-
Returns either the value wrapped by this
Option, if it is not empty, or the given value if thisOptionis empty. - or(T) - Method in interface io.foxcapades.lib.opt.NullableOption
-
Returns either the value wrapped by this
Option, if it is not empty, or the given value if thisOptionis empty. - or(T) - Method in interface io.foxcapades.lib.opt.Option
-
Returns either the value wrapped by this
Option, if it is not empty, or the given value if thisOptionis empty. - orElseThrow(Supplier<? extends E>) - Method in record class io.foxcapades.lib.opt.impl.EmptyNonNull
- orElseThrow(Supplier<? extends E>) - Method in record class io.foxcapades.lib.opt.impl.EmptyNullable
- orElseThrow(Supplier<? extends E>) - Method in class io.foxcapades.lib.opt.impl.FullOption
- orElseThrow(Supplier<? extends E>) - Method in record class io.foxcapades.lib.opt.impl.NullOption
- orElseThrow(Supplier<? extends E>) - Method in interface io.foxcapades.lib.opt.NonNullOption
-
Returns the value wrapped by this
Optionif it is not empty, otherwise throws theExceptionreturned by the givenSupplier. - orElseThrow(Supplier<? extends E>) - Method in interface io.foxcapades.lib.opt.NullableOption
-
Returns the value wrapped by this
Optionif it is not empty, otherwise throws theExceptionreturned by the givenSupplier. - orElseThrow(Supplier<? extends E>) - Method in interface io.foxcapades.lib.opt.Option
-
Returns the value wrapped by this
Optionif it is not empty, otherwise throws theExceptionreturned by the givenSupplier. - orGet(Supplier<? extends T>) - Method in record class io.foxcapades.lib.opt.impl.EmptyNonNull
- orGet(Supplier<? extends T>) - Method in record class io.foxcapades.lib.opt.impl.EmptyNullable
- orGet(Supplier<? extends T>) - Method in class io.foxcapades.lib.opt.impl.FullOption
- orGet(Supplier<? extends T>) - Method in record class io.foxcapades.lib.opt.impl.NullOption
- orGet(Supplier<? extends T>) - Method in interface io.foxcapades.lib.opt.NonNullOption
-
Returns either the value wrapped by this
Option, if it is not empty, or the value returned by the givenSupplier. - orGet(Supplier<? extends T>) - Method in interface io.foxcapades.lib.opt.NullableOption
-
Returns either the value wrapped by this
Option, if it is not empty, or the value returned by the givenSupplier. - orGet(Supplier<? extends T>) - Method in interface io.foxcapades.lib.opt.Option
-
Returns either the value wrapped by this
Option, if it is not empty, or the value returned by the givenSupplier. - orThrow(E) - Method in record class io.foxcapades.lib.opt.impl.EmptyNonNull
- orThrow(E) - Method in record class io.foxcapades.lib.opt.impl.EmptyNullable
- orThrow(E) - Method in class io.foxcapades.lib.opt.impl.FullOption
- orThrow(E) - Method in record class io.foxcapades.lib.opt.impl.NullOption
- orThrow(E) - Method in interface io.foxcapades.lib.opt.NonNullOption
-
Returns the value wrapped by this
Optionif it is not empty, otherwise throws the givenExceptionvalue. - orThrow(E) - Method in interface io.foxcapades.lib.opt.NullableOption
-
Returns the value wrapped by this
Optionif it is not empty, otherwise throws the givenExceptionvalue. - orThrow(E) - Method in interface io.foxcapades.lib.opt.Option
-
Returns the value wrapped by this
Optionif it is not empty, otherwise throws the givenExceptionvalue.
S
- setStandardInstance(Opt) - Static method in class io.foxcapades.lib.opt.Opt
-
Sets the standard/singleton instance that will be used by the static convenience methods.
- standard() - Static method in class io.foxcapades.lib.opt.Opt
-
Returns the currently set standard/singleton instance that will be used by the static convenience methods.
- stream() - Method in record class io.foxcapades.lib.opt.impl.EmptyNonNull
- stream() - Method in record class io.foxcapades.lib.opt.impl.EmptyNullable
- stream() - Method in class io.foxcapades.lib.opt.impl.FullOption
- stream() - Method in record class io.foxcapades.lib.opt.impl.NullOption
- stream() - Method in interface io.foxcapades.lib.opt.NonNullOption
-
Creates a new
Streamcontaining either one value, if thisOptionis not empty, or containing zero values if thisOptionis empty. - stream() - Method in interface io.foxcapades.lib.opt.NullableOption
-
Creates a new
Streamcontaining either one value, if thisOptionis not empty, or containing zero values if thisOptionis empty. - stream() - Method in interface io.foxcapades.lib.opt.Option
-
Creates a new
Streamcontaining either one value, if thisOptionis not empty, or containing zero values if thisOptionis empty.
T
- toNonNullable() - Method in record class io.foxcapades.lib.opt.impl.EmptyNullable
- toNonNullable() - Method in class io.foxcapades.lib.opt.impl.FullNullableOption
- toNonNullable() - Method in record class io.foxcapades.lib.opt.impl.NullOption
- toNonNullable() - Method in interface io.foxcapades.lib.opt.NullableOption
-
Converts this
Optionto aNonNullOption. - toNullable() - Method in record class io.foxcapades.lib.opt.impl.EmptyNonNull
- toNullable() - Method in class io.foxcapades.lib.opt.impl.FullNonNullOption
- toNullable() - Method in interface io.foxcapades.lib.opt.NonNullOption
-
Converts this
NonNullOptioninto an instance ofNullableOption. - toNullable(boolean) - Method in record class io.foxcapades.lib.opt.impl.EmptyNonNull
- toNullable(boolean) - Method in class io.foxcapades.lib.opt.impl.FullNonNullOption
- toNullable(boolean) - Method in interface io.foxcapades.lib.opt.NonNullOption
-
Converts this
NonNullOptioninto an instance ofNullableOption. - toString() - Method in record class io.foxcapades.lib.opt.impl.EmptyNonNull
-
Returns a string representation of this record class.
- toString() - Method in record class io.foxcapades.lib.opt.impl.EmptyNullable
-
Returns a string representation of this record class.
- toString() - Method in record class io.foxcapades.lib.opt.impl.NullOption
-
Returns a string representation of this record class.
U
- unwrap() - Method in record class io.foxcapades.lib.opt.impl.EmptyNonNull
- unwrap() - Method in record class io.foxcapades.lib.opt.impl.EmptyNullable
- unwrap() - Method in class io.foxcapades.lib.opt.impl.FullOption
- unwrap() - Method in record class io.foxcapades.lib.opt.impl.NullOption
- unwrap() - Method in interface io.foxcapades.lib.opt.NonNullOption
-
Attempts to unwrap this
Option's value. - unwrap() - Method in interface io.foxcapades.lib.opt.NullableOption
-
Attempts to unwrap this
Option's value. - unwrap() - Method in interface io.foxcapades.lib.opt.Option
-
Attempts to unwrap this
Option's value. - UnwrapException - Exception in io.foxcapades.lib.opt
-
Exception representing the case where calling code attempts to unwrap an empty
Optioninstance. - UnwrapException(Option<?>) - Constructor for exception io.foxcapades.lib.opt.UnwrapException
V
- value - Variable in class io.foxcapades.lib.opt.impl.FullOption
-
Value wrapped by this option.
- valueEquals(Object) - Method in record class io.foxcapades.lib.opt.impl.EmptyNonNull
- valueEquals(Object) - Method in record class io.foxcapades.lib.opt.impl.EmptyNullable
- valueEquals(Object) - Method in class io.foxcapades.lib.opt.impl.FullOption
- valueEquals(Object) - Method in record class io.foxcapades.lib.opt.impl.NullOption
- valueEquals(Object) - Method in interface io.foxcapades.lib.opt.Option
-
Returns whether the value wrapped by this option equals the given input value.
W
- with(Consumer<? super T>, Runnable) - Method in record class io.foxcapades.lib.opt.impl.EmptyNonNull
- with(Consumer<? super T>, Runnable) - Method in record class io.foxcapades.lib.opt.impl.EmptyNullable
- with(Consumer<? super T>, Runnable) - Method in class io.foxcapades.lib.opt.impl.FullOption
- with(Consumer<? super T>, Runnable) - Method in record class io.foxcapades.lib.opt.impl.NullOption
- with(Consumer<? super T>, Runnable) - Method in interface io.foxcapades.lib.opt.NonNullOption
-
Executes the given
ConsumerifPresenton the wrapped value if thisOptionis not empty, otherwise calls the givenRunnableifEmpty. - with(Consumer<? super T>, Runnable) - Method in interface io.foxcapades.lib.opt.NullableOption
-
Executes the given
ConsumerifPresenton the wrapped value if thisOptionis not empty, otherwise calls the givenRunnableifEmpty. - with(Consumer<? super T>, Runnable) - Method in interface io.foxcapades.lib.opt.Option
-
Executes the given
ConsumerifPresenton the wrapped value if thisOptionis not empty, otherwise calls the givenRunnableifEmpty.
All Classes|All Packages|Serialized Form