Class Optional<T>


  • public final class Optional<T>
    extends Object
    • Method Detail

      • of

        public static <T> Optional<T> of​(T arg)
      • fromNullable

        public static <T> Optional<T> fromNullable​(T nullableReference)
      • absent

        public static <T> Optional<T> absent()
      • get

        public T get()
      • or

        public T or​(T defaultValue)
      • orNull

        public T orNull()
      • isEmpty

        public boolean isEmpty()
      • isPresent

        public boolean isPresent()
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object