summaryrefslogtreecommitdiffstats
path: root/common-app-api/src
diff options
context:
space:
mode:
authorTal Gitelman <tg851x@intl.att.com>2018-04-30 17:40:28 +0300
committerTal Gitelman <tg851x@intl.att.com>2018-04-30 15:59:04 +0000
commit025a1e762676144b055d2f090386d66620096ac8 (patch)
treebc0ac5daf72bfac743d98b2d86f967070a933762 /common-app-api/src
parent485bacef37de06dbda4d8ba26b775b2a0ccff6bd (diff)
Remove dead code common-app-api
Change-Id: I305c40c3795687d6e8e9bc42ec4f8fb8769020cf Issue-ID: SDC-1270 Signed-off-by: Tal Gitelman <tg851x@intl.att.com>
Diffstat (limited to 'common-app-api/src')
-rw-r--r--common-app-api/src/main/java/org/openecomp/sdc/common/util/EitherPair.java34
1 files changed, 0 insertions, 34 deletions
diff --git a/common-app-api/src/main/java/org/openecomp/sdc/common/util/EitherPair.java b/common-app-api/src/main/java/org/openecomp/sdc/common/util/EitherPair.java
deleted file mode 100644
index 44f0d251c2..0000000000
--- a/common-app-api/src/main/java/org/openecomp/sdc/common/util/EitherPair.java
+++ /dev/null
@@ -1,34 +0,0 @@
-package org.openecomp.sdc.common.util;
-
-import fj.data.Either;
-
-import java.util.function.BiFunction;
-import java.util.function.Function;
-
-public class EitherPair<L, M, R> {
-
- private Either<L, R> firstEither;
- private Either<M, R> secondEither;
-
- private EitherPair(Either<L, R> firstEither, Either<M, R> secondEither) {
- this.firstEither = firstEither;
- this.secondEither = secondEither;
- }
-
- public static <L, M, R> EitherPair<L, M, R> from(Either<L, R> firstEither,
- Either<M, R> secondEither) {
- return new EitherPair<>(firstEither, secondEither);
- }
-
- public <X> X either(BiFunction<L, M, X> onLeft, Function<R, X > onRight) {
- if (firstEither.isRight()) {
- return onRight.apply(firstEither.right().value());
- }
- if (secondEither.isRight()) {
- return onRight.apply(secondEither.right().value());
- }
- return onLeft.apply(firstEither.left().value(), secondEither.left().value());
- }
-
-
-}