Package com.yahoo.vespa.config
Class ConfigPayloadBuilder.Array
- java.lang.Object
-
- com.yahoo.vespa.config.ConfigPayloadBuilder.Array
-
- Enclosing class:
- ConfigPayloadBuilder
public class ConfigPayloadBuilder.Array extends java.lang.Object
Representation of a config array, which supports both INDEX and APPEND modes.
-
-
Constructor Summary
Constructors Constructor Description Array(ConfigDefinition configDefinition, java.lang.String name)
Array(ConfigPayloadBuilder.Array other)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ConfigPayloadBuilder
append()
Create a new slime object and returns its payload builder.void
append(java.lang.String value)
Append a value to this array.ConfigPayloadBuilder
get(int index)
Get payload builder in this array corresponding to index.java.util.Collection<ConfigPayloadBuilder>
getElements()
ConfigPayloadBuilder.Array
override(ConfigPayloadBuilder.Array superior)
void
resolve(com.yahoo.slime.Cursor parent)
ConfigPayloadBuilder
set(int index)
Set Create a payload object for the given index and return it.void
set(int index, java.lang.String value)
Set the value of array element index to value
-
-
-
Constructor Detail
-
Array
public Array(ConfigDefinition configDefinition, java.lang.String name)
-
Array
public Array(ConfigPayloadBuilder.Array other)
-
-
Method Detail
-
append
public void append(java.lang.String value)
Append a value to this array.- Parameters:
value
- Value to append.
-
getElements
public java.util.Collection<ConfigPayloadBuilder> getElements()
-
append
public ConfigPayloadBuilder append()
Create a new slime object and returns its payload builder. Append the element after all other elements in the array.- Returns:
- a payload builder for the new slime object.
-
set
public void set(int index, java.lang.String value)
Set the value of array element index to value- Parameters:
index
- Index of array element to set.value
- Value that the element should point to.
-
set
public ConfigPayloadBuilder set(int index)
Set Create a payload object for the given index and return it. Any previously stored version will be overwritten.- Parameters:
index
- Index of new element.- Returns:
- The payload builder for the newly created slime object.
-
get
public ConfigPayloadBuilder get(int index)
Get payload builder in this array corresponding to index. If it does not exist, create a new one.- Parameters:
index
- of element to get.- Returns:
- The corresponding ConfigPayloadBuilder.
-
resolve
public void resolve(com.yahoo.slime.Cursor parent)
-
override
public ConfigPayloadBuilder.Array override(ConfigPayloadBuilder.Array superior)
-
-