From 025a1e762676144b055d2f090386d66620096ac8 Mon Sep 17 00:00:00 2001 From: Tal Gitelman Date: Mon, 30 Apr 2018 17:40:28 +0300 Subject: Remove dead code common-app-api Change-Id: I305c40c3795687d6e8e9bc42ec4f8fb8769020cf Issue-ID: SDC-1270 Signed-off-by: Tal Gitelman --- .../org/openecomp/sdc/common/util/EitherPair.java | 34 ---------------------- 1 file changed, 34 deletions(-) delete mode 100644 common-app-api/src/main/java/org/openecomp/sdc/common/util/EitherPair.java (limited to 'common-app-api/src/main') 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 { - - private Either firstEither; - private Either secondEither; - - private EitherPair(Either firstEither, Either secondEither) { - this.firstEither = firstEither; - this.secondEither = secondEither; - } - - public static EitherPair from(Either firstEither, - Either secondEither) { - return new EitherPair<>(firstEither, secondEither); - } - - public X either(BiFunction onLeft, Function 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()); - } - - -} -- cgit 1.2.3-korg