diff --git a/src/main/java/com/typesafe/config/impl/RawValueType.java b/src/main/java/com/typesafe/config/impl/RawValueType.java deleted file mode 100644 index ae5ac2e5..00000000 --- a/src/main/java/com/typesafe/config/impl/RawValueType.java +++ /dev/null @@ -1,27 +0,0 @@ -package com.typesafe.config.impl; - -import com.typesafe.config.ConfigValueType; - -enum RawValueType { - OBJECT(ConfigValueType.OBJECT), - - LIST(ConfigValueType.LIST), - - NUMBER(ConfigValueType.NUMBER), - - BOOLEAN(ConfigValueType.BOOLEAN), - - NULL(ConfigValueType.NULL), - - STRING(ConfigValueType.STRING), - - SUBSTITUTION(null), - - INCLUDE(null); - - ConfigValueType cooked; - - RawValueType(ConfigValueType cooked) { - this.cooked = cooked; - } -} diff --git a/src/main/java/com/typesafe/config/impl/StackConfigObject.java b/src/main/java/com/typesafe/config/impl/StackConfigObject.java deleted file mode 100644 index f9d2784e..00000000 --- a/src/main/java/com/typesafe/config/impl/StackConfigObject.java +++ /dev/null @@ -1,76 +0,0 @@ -package com.typesafe.config.impl; - -import java.util.Collections; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import com.typesafe.config.ConfigOrigin; - -/** - * This is unused for now, decided that it was too annoying to "lazy merge" and - * better to do the full merge up-front. - */ -final class StackConfigObject extends AbstractConfigObject { - - private List stack; - - /** - * The stack is ordered from highest to lowest priority. So the start of the - * list is the top of the search path. - */ - StackConfigObject(ConfigOrigin origin, ConfigTransformer transformer, - List stack) { - super(origin, transformer); - this.stack = stack; - } - - @Override - public boolean containsKey(String key) { - for (AbstractConfigObject o : stack) { - if (o.containsKey(key)) - return true; - } - return false; - } - - @Override - public Set keySet() { - if (stack.isEmpty()) { - return Collections.emptySet(); - } else if (stack.size() == 1) { - return stack.get(0).keySet(); - } else { - Set combined = new HashSet(); - for (AbstractConfigObject o : stack) { - combined.addAll(o.keySet()); - } - return combined; - } - } - - @Override - public Object unwrapped() { - Map m = new HashMap(); - for (AbstractConfigObject o : stack) { - for (String k : o.keySet()) { - m.put(k, o.peek(k).unwrapped()); - } - } - return m; - } - - @Override - protected AbstractConfigValue peek(String key) { - for (AbstractConfigObject o : stack) { - // Important: A ConfigNull value would override - // and keep us from returning a later non-null value. - AbstractConfigValue v = o.peek(key); - if (v != null) - return v; - } - return null; - } -}