Interface ConfigList
-
- All Superinterfaces:
java.util.Collection<ConfigValue>
,ConfigMergeable
,ConfigValue
,java.lang.Iterable<ConfigValue>
,java.util.List<ConfigValue>
public interface ConfigList extends java.util.List<ConfigValue>, ConfigValue
Subtype ofConfigValue
representing a list value, as in JSON's[1,2,3]
syntax.ConfigList
implementsjava.util.List<ConfigValue>
so you can use it like a regular Java list. Or callunwrapped()
to unwrap the list elements into plain Java values.Like all
ConfigValue
subtypes,ConfigList
is immutable. This makes it threadsafe and you never have to create "defensive copies." The mutator methods fromList
all throwUnsupportedOperationException
.The
ConfigValue.valueType()
method on a list returnsConfigValueType.LIST
.Do not implement
ConfigList
; it should only be implemented by the config library. Arbitrary implementations will not work because the library internals assume a specific concrete implementation. Also, this interface is likely to grow new methods over time, so third-party implementations will break.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.util.List<java.lang.Object>
unwrapped()
Recursively unwraps the list, returning a list of plain Java values such as Integer or String or whatever is in the list.-
Methods inherited from interface com.typesafe.config.ConfigValue
atKey, atPath, origin, render, render, valueType, withFallback
-
Methods inherited from interface java.util.List
add, add, addAll, addAll, clear, contains, containsAll, equals, get, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, replaceAll, retainAll, set, size, sort, spliterator, subList, toArray, toArray
-
-
-
-
Method Detail
-
unwrapped
java.util.List<java.lang.Object> unwrapped()
Recursively unwraps the list, returning a list of plain Java values such as Integer or String or whatever is in the list.- Specified by:
unwrapped
in interfaceConfigValue
-
-