diff options
| author | bculkin2442 <bjculkin@mix.wvu.edu> | 2017-03-25 19:14:18 -0400 |
|---|---|---|
| committer | bculkin2442 <bjculkin@mix.wvu.edu> | 2017-03-25 19:14:18 -0400 |
| commit | 9716b1ac09eb92c4ed001be4350d54b41b953239 (patch) | |
| tree | 606e56d2375e22464e956f89bb44af38cba008c7 /BJC-Utils2/src/main/java/bjc/utils/data/Either.java | |
| parent | 42990231fee502552b769b9af4c04ac0dcaeb195 (diff) | |
Add static constructors
Diffstat (limited to 'BJC-Utils2/src/main/java/bjc/utils/data/Either.java')
| -rw-r--r-- | BJC-Utils2/src/main/java/bjc/utils/data/Either.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/BJC-Utils2/src/main/java/bjc/utils/data/Either.java b/BJC-Utils2/src/main/java/bjc/utils/data/Either.java index 334beef..3ccc859 100644 --- a/BJC-Utils2/src/main/java/bjc/utils/data/Either.java +++ b/BJC-Utils2/src/main/java/bjc/utils/data/Either.java @@ -25,7 +25,7 @@ public class Either<LeftType, RightType> implements IPair<LeftType, RightType> { * The value to put on the left * @return An either with the left side occupied */ - public static <LeftType, RightType> Either<LeftType, RightType> fromLeft(LeftType left) { + public static <LeftType, RightType> Either<LeftType, RightType> left(LeftType left) { return new Either<>(left, null); } @@ -40,7 +40,7 @@ public class Either<LeftType, RightType> implements IPair<LeftType, RightType> { * The value to put on the right * @return An either with the right side occupied */ - public static <LeftType, RightType> Either<LeftType, RightType> fromRight(RightType right) { + public static <LeftType, RightType> Either<LeftType, RightType> right(RightType right) { return new Either<>(null, right); } |
