Kerbal Space Program
1.12.4
|
Struct representing a value that can be an instance of either the L (left) or the R (right) type. More...
Public Member Functions | |
V | Cata< V > (DelegateFunc< L, V > leftFunc, DelegateFunc< R, V > rightFunc) |
If the either isLeft, returns leftFunc applied to the either's value; otherwise, returns rightFunc applied to the either's value. More... | |
V | Cata< V, P > (DelegateFunc< L, P, V > leftFunc, P p, DelegateFunc< R, V > rightFunc) |
If the either isLeft, returns leftFunc applied to the either's value and p; otherwise, returns rightFunc applied to the either's value. More... | |
V | Cata< V, P, P2 > (DelegateFunc< L, P, V > leftFunc, P p, DelegateFunc< R, P2, V > rightFunc, P2 p2) |
If the either isLeft, returns leftFunc applied to the either's value and p; otherwise, returns rightFunc applied to the either's value and p2. More... | |
V | Cata< V, P2 > (DelegateFunc< L, V > leftFunc, DelegateFunc< R, P2, V > rightFunc, P2 p2) |
If the either isLeft, returns leftFunc applied to the either's value; otherwise, returns rightFunc applied to the either's value and p2. More... | |
int | CompareTo (Either< L, R > other) |
override bool | Equals (object o) |
bool | Equals (Either< L, R > other) |
void | ForEach (DelegateAction< L > leftAction, DelegateAction< R > rightAction) |
If the either isLeft, applies leftAction to the either's value; otherwise, applies rightAction to the either's value. More... | |
void | ForEach< P > (DelegateAction< L, P > leftAction, P p, DelegateAction< R > rightAction) |
If the either isLeft, applies leftAction to the either's value and p; otherwise, applies rightAction to the either's value. More... | |
void | ForEach< P, P2 > (DelegateAction< L, P > leftAction, P p, DelegateAction< R, P2 > rightAction, P2 p2) |
If the either isLeft, applies leftAction to the either's value and p; otherwise, applies rightAction to the either's value and p2. More... | |
void | ForEach< P2 > (DelegateAction< L > leftAction, DelegateAction< R, P2 > rightAction, P2 p2) |
If the either isLeft, applies leftAction to the either's value; otherwise, applies rightAction to the either's value and p2. More... | |
override int | GetHashCode () |
override string | ToString () |
Static Public Member Functions | |
static Either< L, R > | Left (L value) |
Returns a left either containing the specified value. More... | |
static bool | operator!= (Either< L, R > lhs, Either< L, R > rhs) |
static bool | operator< (Either< L, R > lhs, Either< L, R > rhs) |
static bool | operator<= (Either< L, R > lhs, Either< L, R > rhs) |
static bool | operator== (Either< L, R > lhs, Either< L, R > rhs) |
static bool | operator> (Either< L, R > lhs, Either< L, R > rhs) |
static bool | operator>= (Either< L, R > lhs, Either< L, R > rhs) |
static Either< L, R > | Right (R value) |
Returns a right either containing the specified value. More... | |
Public Attributes | |
readonly bool | isLeft |
True if the either contains an L value; otherwise, false; More... | |
readonly L | leftValue |
If the either isLeft, the value contained by the either; otherwise, default(L). More... | |
readonly R | rightValue |
If the either isRight, the value contained by the either; otherwise, default(R). More... | |
Properties | |
bool | isRight [get] |
True if the either contains an R value; otherwise, false; More... | |
Option< L > | leftOption [get] |
If the either isLeft, the an option containing the either's value; otherwise, an empty option. More... | |
Option< R > | rightOption [get] |
If the either isRight, the an option containing the either's value; otherwise, an empty option. More... | |
Struct representing a value that can be an instance of either the L (left) or the R (right) type.
|
inline |
If the either isLeft, returns leftFunc applied to the either's value; otherwise, returns rightFunc applied to the either's value.
|
inline |
If the either isLeft, returns leftFunc applied to the either's value and p; otherwise, returns rightFunc applied to the either's value.
|
inline |
If the either isLeft, returns leftFunc applied to the either's value and p; otherwise, returns rightFunc applied to the either's value and p2.
|
inline |
If the either isLeft, returns leftFunc applied to the either's value; otherwise, returns rightFunc applied to the either's value and p2.
|
inline |
|
inline |
If the either isLeft, applies leftAction to the either's value; otherwise, applies rightAction to the either's value.
|
inline |
If the either isLeft, applies leftAction to the either's value and p; otherwise, applies rightAction to the either's value.
|
inline |
If the either isLeft, applies leftAction to the either's value and p; otherwise, applies rightAction to the either's value and p2.
|
inline |
If the either isLeft, applies leftAction to the either's value; otherwise, applies rightAction to the either's value and p2.
|
inline |
Returns a left either containing the specified value.
value | Value. |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
Returns a right either containing the specified value.
value | Value. |
|
inline |
readonly bool Smooth.Algebraics.Either< L, R >.isLeft |
True if the either contains an L value; otherwise, false;
readonly L Smooth.Algebraics.Either< L, R >.leftValue |
If the either isLeft, the value contained by the either; otherwise, default(L).
If the either isRight, the value contained by the either; otherwise, default(R).
|
get |
True if the either contains an R value; otherwise, false;
If the either isLeft, the an option containing the either's value; otherwise, an empty option.
If the either isRight, the an option containing the either's value; otherwise, an empty option.