public class Either

Summary

Models the disjoint union of two alternatives, a "left" alternative and a "right" alternative.

Remarks

Borrowed from ML, Haskell etc.

Property Summary

Flags Type Name Summary
public EitherAlternative Alternative (rw)

Retrieve the alternative represented by this instance.

public object Value (rw)

Retrieve the value carried by this instance.

Method Summary

Flags Name Summary
public static Either Left(object value)

Constructs an Either instance representing a Left alternative.

public static Either Right(object value)

Constructs an Either instance representing a Right alternative.

Property Detail

public EitherAlternative Alternative (rw)

Summary

Retrieve the alternative represented by this instance.

public object Value (rw)

Summary

Retrieve the value carried by this instance.

Method Detail

Left

public static Either Left(object value)

Flags public static
Return type Either
Parameters
Name Type
value object

Summary

Constructs an Either instance representing a Left alternative.

Right

public static Either Right(object value)

Flags public static
Return type Either
Parameters
Name Type
value object

Summary

Constructs an Either instance representing a Right alternative.