From a3d2728f84375566da3da560b3faad018d34005d Mon Sep 17 00:00:00 2001 From: Ben Culkin Date: Fri, 16 Sep 2022 18:58:48 -0400 Subject: Cleanup --- .../java/bjc/utils/ioutils/SimpleProperties.java | 51 ++-------------------- 1 file changed, 4 insertions(+), 47 deletions(-) (limited to 'base/src/main/java/bjc/utils/ioutils/SimpleProperties.java') diff --git a/base/src/main/java/bjc/utils/ioutils/SimpleProperties.java b/base/src/main/java/bjc/utils/ioutils/SimpleProperties.java index d380866..0aa18b4 100644 --- a/base/src/main/java/bjc/utils/ioutils/SimpleProperties.java +++ b/base/src/main/java/bjc/utils/ioutils/SimpleProperties.java @@ -17,45 +17,6 @@ import java.util.Set; * */ public class SimpleProperties implements Map { - /** - * Exception thrown when there is a duplicate key, when they are forbidden. - * - * @author 15405 - * - */ - public static class DuplicateKeys extends RuntimeException { - private static final long serialVersionUID = -5521190136366024804L; - - /** - * Create a new duplicate key exception. - * - * @param keyName - * The name of the key that has been duplicated. - */ - public DuplicateKeys(String keyName) { - super(String.format("Duplicate value encountered for key '%s'", keyName)); - } - } - - /** - * Exception thrown when a line is formattted incorrectly. - * @author Ben Culkin - * - */ - public static class InvalidLineFormat extends RuntimeException { - private static final long serialVersionUID = 5332131472090792841L; - - /** - * Create a new exception for an incorrectly formatted line. - * @param lne The line that was incorrectly formatted. - */ - public InvalidLineFormat(String lne) { - super(String.format( - "Line '%s' is improperly formatted.\n\tExpected format is a string key, followed by a single space, followed by the value", - "")); - } - } - private final Map props; /** @@ -170,20 +131,17 @@ public class SimpleProperties implements Map { return props.isEmpty(); } - @SuppressWarnings("unlikely-arg-type") - @Override + @Override public boolean containsKey(final Object key) { return props.containsKey(key); } - @SuppressWarnings("unlikely-arg-type") - @Override + @Override public boolean containsValue(final Object value) { return props.containsValue(value); } - @SuppressWarnings("unlikely-arg-type") - @Override + @Override public String get(final Object key) { return props.get(key); } @@ -193,8 +151,7 @@ public class SimpleProperties implements Map { return props.put(key, value); } - @SuppressWarnings("unlikely-arg-type") - @Override + @Override public String remove(final Object key) { return props.remove(key); } -- cgit v1.2.3