Rename yangtools.concepts.Variant to Either
[yangtools.git] / yang / yang-common / src / main / java / org / opendaylight / yangtools / yang / common / CanonicalValueValidator.java
index 98659230f86f565584c4dc1090fd86293c5e2e4f..9f42f51c2600fe3d8f6c2fd4ea362160374189b2 100644 (file)
@@ -9,8 +9,8 @@ package org.opendaylight.yangtools.yang.common;
 
 import com.google.common.annotations.Beta;
 import org.eclipse.jdt.annotation.NonNullByDefault;
+import org.opendaylight.yangtools.concepts.Either;
 import org.opendaylight.yangtools.concepts.Immutable;
-import org.opendaylight.yangtools.concepts.Variant;
 
 /**
  * {@link CanonicalValue} validator interface. Implementations of this interface can perform further validation of
@@ -52,7 +52,7 @@ public interface CanonicalValueValidator<T extends CanonicalValue<T>, V extends
      * @return Validated representation or a {@link CanonicalValueViolation}
      * @throws NullPointerException if {@code value} is null
      */
-    default Variant<T, CanonicalValueViolation> validateRepresentation(final T value) {
+    default Either<T, CanonicalValueViolation> validateRepresentation(final T value) {
         return validateRepresentation(value, value.toCanonicalString());
     }
 
@@ -66,5 +66,5 @@ public interface CanonicalValueValidator<T extends CanonicalValue<T>, V extends
      * @return Validated representation or a {@link CanonicalValueViolation}
      * @throws NullPointerException if {@code value} or {@code canonicalString} is null.
      */
-    Variant<T, CanonicalValueViolation> validateRepresentation(T value, String canonicalString);
+    Either<T, CanonicalValueViolation> validateRepresentation(T value, String canonicalString);
 }