| Constructor and Description |
|---|
Options.Eithers() |
| Modifier and Type | Method and Description |
|---|---|
static <LT,RT> Iterator<LT> |
lefts(Iterable<Either<LT,RT>> eithers)
Creates an iterator yielding only left wrapped values from an
iterable of Either.
|
static <LT,RT> Iterator<LT> |
lefts(Iterator<Either<LT,RT>> eithers)
Creates an iterator yielding only left wrapped values from an
iterator of Either.
|
static <LT,RT> Either<LT,RT> |
pure(Class<LT> leftClass,
RT value)
Yields Either.pure() of a value.
|
static <LT,RT> Either<LT,RT> |
pure(RT value)
Yields Either.pure() of a value.
|
static <LT,RT> Iterator<Either<LT,RT>> |
pures(Iterable<RT> values)
Creates an iterator transforming values from the source iterable into
pure() Either
|
static <LT,RT> Iterator<Either<LT,RT>> |
pures(Iterator<RT> values)
Creates an iterator transforming values from the source iterator into
pure() Either
|
static <LT,RT> Iterator<Either<LT,RT>> |
pures(RT... values)
Creates an iterator transforming values from the source array into
pure() Either
|
static <LT,RT> Iterator<Either<LT,RT>> |
pures(RT value)
Creates a singleton iterator yielding pure() Either
|
static <LT,RT> Iterator<Either<LT,RT>> |
pures(RT first,
RT second)
Creates an iterator yielding pure() Either
|
static <LT,RT> Iterator<Either<LT,RT>> |
pures(RT first,
RT second,
RT third)
Creates an iterator yielding pure() Either
|
static <LT,RT> Iterator<RT> |
rights(Iterable<Either<LT,RT>> eithers)
Creates an iterator yielding only right wrapped values from an
iterable of Either.
|
static <LT,RT> Iterator<RT> |
rights(Iterator<Either<LT,RT>> eithers)
Creates an iterator yielding only right wrapped values from an
iterator of Either.
|
public static <LT,RT> Either<LT,RT> pure(RT value)
Eithers.pure(1) -> Either.right(1)LT - the left typeRT - the right typevalue - the value to be transformedpublic static <LT,RT> Either<LT,RT> pure(Class<LT> leftClass, RT value)
Eithers.pure(1) -> Either.right(1)LT - the left typeRT - the right typeleftClass - the left type (used for type inference)value - the value to be transformedpublic static <LT,RT> Iterator<Either<LT,RT>> pures(Iterator<RT> values)
Eithers.pures([1,2,3]) -> [Right 1, Right 2, Right 3]LT - the left typeRT - the right typevalues - the source iteratorpublic static <LT,RT> Iterator<Either<LT,RT>> pures(Iterable<RT> values)
Eithers.pures([1,2,3]) -> [Right 1, Right 2, Right 3]LT - the left typeRT - the right typevalues - the source iterablepublic static <LT,RT> Iterator<Either<LT,RT>> pures(RT value)
Eithers.pures(1) -> [Right 1]LT - the left typeRT - the right typevalue - the value to be transformedpublic static <LT,RT> Iterator<Either<LT,RT>> pures(RT first, RT second)
Eithers.pures(1, 2) -> [Right 1, Right 2]LT - the left typeRT - the right typefirst - the first valuesecond - the second valuepublic static <LT,RT> Iterator<Either<LT,RT>> pures(RT first, RT second, RT third)
Eithers.pures(1, 2, 3) -> [Right 1, Right 2, Right 3]LT - the left typeRT - the right typefirst - the first valuesecond - the second valuethird - the third valuepublic static <LT,RT> Iterator<Either<LT,RT>> pures(RT... values)
Eithers.pures([1,2,3]) -> [Right 1, Right 2, Right 3]LT - the left typeRT - the right typevalues - the source arraypublic static <LT,RT> Iterator<LT> lefts(Iterator<Either<LT,RT>> eithers)
Eithers.lefts([Right 1, Left 2, Right 3, Left 4]) -> [2, 4]LT - the left typeRT - the right typeeithers - the source iteratorpublic static <LT,RT> Iterator<LT> lefts(Iterable<Either<LT,RT>> eithers)
Eithers.lefts([Right 1, Left 2, Right 3, Left 4]) -> [2, 4]LT - the left typeRT - the right typeeithers - the source iterablepublic static <LT,RT> Iterator<RT> rights(Iterator<Either<LT,RT>> eithers)
Eithers.rights([Right 1, Left 2, Right 3, Left 4]) -> [1, 3]LT - the left typeRT - the right typeeithers - the source iteratorpublic static <LT,RT> Iterator<RT> rights(Iterable<Either<LT,RT>> eithers)
Eithers.rights([Right 1, Left 2, Right 3, Left 4]) -> [1, 3]LT - the left typeRT - the right typeeithers - the source iterableCopyright © 2012. All Rights Reserved.