Top Description Methods
com.typesafe.config

public Interface ConfigList

extends List<ConfigValue>, ConfigValue
Known Direct Implementers
com.typesafe.config.impl.SimpleConfigList
Imports
java.util.List

Subtype of ConfigValue representing a list value, as in JSON's [1,2,3] syntax.

ConfigList implements java.util.List<ConfigValue> so you can use it like a regular Java list. Or call unwrapped() 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 from java.util.List all throw java.lang.UnsupportedOperationException.

The ConfigValue#valueType method on a list returns ConfigValueType#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

Modifier and TypeMethod and Description
public List<Object>

Returns:

a java.util.List containing plain Java objects
unwrapped
()

Redeclares com.typesafe.config.ConfigValue.unwrapped.

Recursively unwraps the list, returning a list of plain Java values such as Integer or String or whatever is in the list.

public ConfigList
withOrigin(ConfigOrigin
the origin set on the returned value
origin
)

Redeclares com.typesafe.config.ConfigValue.withOrigin.

Returns a ConfigValue based on this one, but with the given origin.

Inherited from com.typesafe.config.ConfigValue:
atKeyatPathoriginrenderrendervalueTypewithFallback
Inherited from java.util.List:
addaddaddAlladdAlladdFirstaddLastclearcontainscontainsAllcopyOfequalsgetgetFirstgetLasthashCodeindexOfisEmptyiteratorlastIndexOflistIteratorlistIteratorofofofofofofofofofofofofremoveremoveremoveAllremoveFirstremoveLastreplaceAllretainAllreversedsetsizesortspliteratorsubListtoArraytoArray

Method Detail

unwrappedback to summary
public List<Object> unwrapped()

Redeclares com.typesafe.config.ConfigValue.unwrapped.

Recursively unwraps the list, returning a list of plain Java values such as Integer or String or whatever is in the list.

Returns:List<Object>

a java.util.List containing plain Java objects

Annotations
@Override
withOriginback to summary
public ConfigList withOrigin(ConfigOrigin origin)

Redeclares com.typesafe.config.ConfigValue.withOrigin.

Doc from com.typesafe.config.ConfigValue.withOrigin.

Returns a ConfigValue based on this one, but with the given origin. This is useful when you are parsing a new format of file or setting comments for a single ConfigValue.

Parameters
origin:ConfigOrigin

the origin set on the returned value

Returns:ConfigList

the new ConfigValue with the given origin

Annotations
@Override