Class Optional.Some<E>

  • All Implemented Interfaces:
    Optional<E>
    Enclosing interface:
    Optional<E>

    public static final class Optional.Some<E>
    extends java.lang.Object
    implements Optional<E>
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private E value  
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private Some​(E value)  
    • Field Detail

      • value

        private final E value
    • Constructor Detail

      • Some

        private Some​(E value)
    • Method Detail

      • of

        static final <E> Optional<E> of​(E value)
      • get

        public E get()
        Specified by:
        get in interface Optional<E>
      • isPresent

        public boolean isPresent()
        Specified by:
        isPresent in interface Optional<E>