Package com.fa993.types.supertype
Class Either
- java.lang.Object
-
- com.fa993.types.supertype.Either
-
public class Either extends Object
A utility class representing an exclusive choice between two or three possible types.The
Either
class contains nested classes to handle either two or three alternatives. TheEither.Selector
enum is used to indicate which option is currently selected.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Either.OfThree<A,B,C>
Represents an exclusive choice between three possible types.static class
Either.OfTwo<A,B>
Represents an exclusive choice between two possible types.static class
Either.Selector
Enum representing the possible choices: First, Second, or Third.
-