Interface Option<T>

All Superinterfaces:
Monad<T>, MonadAccessor<T>
All Known Implementing Classes:
Option.None, Option.Some

public interface Option<T> extends Monad<T>
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static final record 
     
    static final record 
     
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final Option.None
     
  • Method Summary

    Static Methods
    Modifier and Type
    Method
    Description
    static <T> Option<T>
     
    static <T> Option<T>
    of(T t)
     
    static <T> Option<T>
    some(T t)
     

    Methods inherited from interface com.github.skopylov58.functional.Monad

    bind, map

    Methods inherited from interface com.github.skopylov58.functional.MonadAccessor

    getOrDefault, optional, stream
  • Field Details

  • Method Details

    • of

      static <T> Option<T> of(T t)
    • some

      static <T> Option<T> some(T t)
    • none

      static <T> Option<T> none()