From 7cde7c2d7eb58696f762a500ab351c7563a7834c Mon Sep 17 00:00:00 2001 From: Martin Polden Date: Fri, 19 Jul 2019 09:18:40 +0200 Subject: Remove unused RotationName class --- .../com/yahoo/config/provision/RotationName.java | 58 ---------------------- 1 file changed, 58 deletions(-) delete mode 100644 config-provisioning/src/main/java/com/yahoo/config/provision/RotationName.java (limited to 'config-provisioning/src') diff --git a/config-provisioning/src/main/java/com/yahoo/config/provision/RotationName.java b/config-provisioning/src/main/java/com/yahoo/config/provision/RotationName.java deleted file mode 100644 index fb6d9dc09e6..00000000000 --- a/config-provisioning/src/main/java/com/yahoo/config/provision/RotationName.java +++ /dev/null @@ -1,58 +0,0 @@ -// Copyright 2019 Oath Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -package com.yahoo.config.provision; - -import java.util.Objects; - -/** - * Represents a rotation name for a container cluster. Typically created from the rotation element in services.xml. - * - * @author mpolden - */ -// TODO(mpolden): Remove this once all usages have been replaced -public class RotationName implements Comparable { - - private final String name; - - private RotationName(String name) { - this.name = requireNonBlank(name, "name must be non-empty"); - } - - public String value() { - return name; - } - - @Override - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - RotationName that = (RotationName) o; - return name.equals(that.name); - } - - @Override - public int hashCode() { - return Objects.hash(name); - } - - @Override - public int compareTo(RotationName o) { - return name.compareTo(o.name); - } - - @Override - public String toString() { - return "rotation '" + name + "'"; - } - - public static RotationName from(String name) { - return new RotationName(name); - } - - private static String requireNonBlank(String s, String message) { - if (s == null || s.isBlank()) { - throw new IllegalArgumentException(message); - } - return s; - } - -} -- cgit v1.2.3