| Package | Description |
|---|---|
| com.syntaxphoenix.syntaxapi.utils.java.tools |
| Modifier and Type | Method and Description |
|---|---|
static <T> Container<T> |
Container.empty()
Returns an empty
Container instance. |
Container<T> |
Container.filter(java.util.function.Predicate<? super T> predicate)
If a value is present, and the value matches the given predicate, returns an
Container describing the value, otherwise returns an empty
Container. |
<U> Container<U> |
Container.flatMap(java.util.function.Function<? super T,? extends Container<? extends U>> mapper)
If a value is present, returns the result of applying the given
Container-bearing mapping function to the value, otherwise returns an
empty Container. |
Container<T> |
Container.lock()
locks the container
|
<U> Container<U> |
Container.map(java.util.function.Function<? super T,? extends U> mapper)
If a value is present, returns an
Container describing the result of
applying the given mapping function to the value, otherwise returns an empty
Container. |
static <T> Container<T> |
Container.of()
Returns an
Container |
static <T> Container<T> |
Container.of(T value)
Returns an
Container describing the given value. |
static <T> Container<T> |
Container.ofOptional(Optional<T> value)
Returns an
Container describing the given value of the optional. |
static <T> Container<T> |
Container.ofOptionalUnmodifiable(Optional<T> value)
Returns an
Container describing the given value of the optional. |
static <T> Container<T> |
Container.ofUnmodifiable(T value)
Returns an
Container describing the given value. |
Container<T> |
Container.or(java.util.function.Supplier<? extends Container<? extends T>> supplier)
If a value is present, returns an
Container describing the value,
otherwise returns an Container produced by the supplying function. |
Container<T> |
Container.replace(T value)
replaces the value with the given value
|
| Modifier and Type | Method and Description |
|---|---|
<U> Container<U> |
Container.flatMap(java.util.function.Function<? super T,? extends Container<? extends U>> mapper)
If a value is present, returns the result of applying the given
Container-bearing mapping function to the value, otherwise returns an
empty Container. |
Container<T> |
Container.or(java.util.function.Supplier<? extends Container<? extends T>> supplier)
If a value is present, returns an
Container describing the value,
otherwise returns an Container produced by the supplying function. |
Copyright © 2022. All rights reserved.