Class Eithers.CaseOfMatchers.PartialMatcher<A,​B,​X>

    • Field Summary

      Fields 
      Modifier and Type Field Description
      private Either<A,​B> _either  
      private java.util.function.Function<A,​X> left  
      private java.util.function.Function<B,​X> right  
    • Constructor Summary

      Constructors 
      Constructor Description
      PartialMatcher​(Either<A,​B> _either, java.util.function.Function<A,​X> left, java.util.function.Function<B,​X> right)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      X otherwise​(java.util.function.Supplier<X> otherwise)  
      X otherwise_​(X x)  
      java.util.Optional<X> otherwiseEmpty()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • _either

        private final Either<A,​B> _either
      • left

        private final java.util.function.Function<A,​X> left
      • right

        private final java.util.function.Function<B,​X> right
    • Constructor Detail

      • PartialMatcher

        PartialMatcher​(Either<A,​B> _either,
                       java.util.function.Function<A,​X> left,
                       java.util.function.Function<B,​X> right)
    • Method Detail

      • otherwise

        public final X otherwise​(java.util.function.Supplier<X> otherwise)
      • otherwise_

        public final X otherwise_​(X x)
      • otherwiseEmpty

        public final java.util.Optional<X> otherwiseEmpty()