Uses of Class
dev.mccue.guava.base.Optional

  • Uses of Optional in dev.mccue.guava.base

    Methods in dev.mccue.guava.base that return Optional
    Modifier and Type
    Method
    Description
    static <T> Optional<T>
    Optional.absent()
    Returns an Optional instance with no contained reference.
    static <T> Optional<T>
    Optional.fromJavaUtil(Optional<T> javaUtilOptional)
    Returns the equivalent dev.mccue.guava.base.Optional value to the given java.util.Optional, or null if the argument is null.
    static <T> Optional<T>
    Optional.fromNullable(T nullableReference)
    If nullableReference is non-null, returns an Optional instance containing that reference; otherwise returns Optional#absent.
    static <T extends Enum<T>>
    Optional<T>
    Enums.getIfPresent(Class<T> enumClass, String value)
    Returns an optional enum constant for the given type, using Enum#valueOf.
    static <T> Optional<T>
    Optional.of(T reference)
    Returns an Optional instance containing the given non-null reference.
    abstract Optional<T>
    Optional.or(Optional<? extends T> secondChoice)
    Returns this Optional if it has a value present; secondChoice otherwise.
    abstract <V> Optional<V>
    Optional.transform(Function<? super T,V> function)
    If the instance is present, it is transformed with the given Function; otherwise, Optional#absent is returned.
    Methods in dev.mccue.guava.base with parameters of type Optional
    Modifier and Type
    Method
    Description
    abstract Optional<T>
    Optional.or(Optional<? extends T> secondChoice)
    Returns this Optional if it has a value present; secondChoice otherwise.
    static <T> Optional<T>
    Optional.toJavaUtil(Optional<T> googleOptional)
    Returns the equivalent java.util.Optional value to the given dev.mccue.guava.base.Optional, or null if the argument is null.
    Method parameters in dev.mccue.guava.base with type arguments of type Optional
    Modifier and Type
    Method
    Description
    static <T> Iterable<T>
    Optional.presentInstances(Iterable<? extends Optional<? extends T>> optionals)
    Returns the value of each present instance from the supplied optionals, in order, skipping over occurrences of Optional#absent.