com.spencerwi.either.Result$Ok.class Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of Either.java Show documentation
Show all versions of Either.java Show documentation
A right-biased implementation of "Either a b" for Java, using Java 8 for mapping/folding and type inference.
???? 4 J
-
.
/
0 1 2
3 4 5
6 7 8
6 :
; < (Ljava/lang/Object;)V Code LineNumberTable Signature (TR;)V getException ()Ljava/lang/Exception; getResult ()Ljava/lang/Object; ()TR; isErr ()Z isOk fold N(Ljava/util/function/Function;Ljava/util/function/Function;)Ljava/lang/Object; w(Ljava/util/function/Function;Ljava/util/function/Function;)TT; hashCode ()I equals (Ljava/lang/Object;)Z
StackMapTable map <(Ljava/util/function/Function;)Lcom/spencerwi/either/Result; _(Ljava/util/function/Function;)Lcom/spencerwi/either/Result; = InnerClasses 4(Ljava/lang/Object;Lcom/spencerwi/either/Result$1;)V 8Lcom/spencerwi/either/Result;
SourceFile Result.java > ? @ A B java/util/NoSuchElementException Tried to getException from a Ok C D E F G com/spencerwi/either/Result$Ok Ok ! " H I com/spencerwi/either/Result com/spencerwi/either/Result$1 ()V leftValue Ljava/lang/Exception;
rightValue Ljava/lang/Object; (Ljava/lang/String;)V java/util/function/Function apply &(Ljava/lang/Object;)Ljava/lang/Object; java/lang/Object ok 1(Ljava/lang/Object;)Lcom/spencerwi/either/Result; !
3 *? *? *+? ? H I J K "
? Y? ? N *? ? P ? S ? U # ,*? ? ? Y *? ? ? \ ! " G +?
? +?
M*? ,? ? ?? _ ` a c # $ % &