Class 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. The Either.Selector enum is used to indicate which option is currently selected.