Uses of Class
dev.mccue.guava.base.Optional
-
Uses of Optional in dev.mccue.guava.base
Methods in dev.mccue.guava.base that return OptionalModifier and TypeMethodDescriptionstatic <T> Optional<T>Optional.absent()Returns anOptionalinstance with no contained reference.static <T> Optional<T>Optional.fromJavaUtil(Optional<T> javaUtilOptional) Returns the equivalentdev.mccue.guava.base.Optionalvalue to the givenjava.util.Optional, ornullif the argument is null.static <T> Optional<T>Optional.fromNullable(T nullableReference) IfnullableReferenceis non-null, returns anOptionalinstance containing that reference; otherwise returnsabsent().Enums.getIfPresent(Class<T> enumClass, String value) Returns an optional enum constant for the given type, usingEnum.valueOf(java.lang.Class<T>, java.lang.String).static <T> Optional<T>Optional.of(T reference) Returns anOptionalinstance containing the given non-null reference.Returns thisOptionalif it has a value present;secondChoiceotherwise.abstract <V> Optional<V>Methods in dev.mccue.guava.base with parameters of type OptionalModifier and TypeMethodDescriptionReturns thisOptionalif it has a value present;secondChoiceotherwise.static <T> Optional<T>Optional.toJavaUtil(Optional<T> googleOptional) Returns the equivalentjava.util.Optionalvalue to the givendev.mccue.guava.base.Optional, ornullif the argument is null.Method parameters in dev.mccue.guava.base with type arguments of type OptionalModifier and TypeMethodDescriptionstatic <T> Iterable<T>Optional.presentInstances(Iterable<? extends Optional<? extends T>> optionals) Returns the value of each present instance from the suppliedoptionals, in order, skipping over occurrences ofabsent().