| Modifier and Type | Field and Description |
|---|---|
| private ConfigNodeRoot | |
| private ConfigParseOptions |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | equals(Object
the reference object with which to compare. other)Overrides java. Indicates whether some other object is "equal to" this one. |
| public int | |
| public boolean | hasPath(String
the path to check path)Implements com. Returns a boolean indicating whether or not a ConfigDocument has a value at the desired path. |
| public String | render()
Implements com. The original text of the input, modified if necessary with any replaced or added values. |
| public ConfigDocument | withoutPath(String
the path to remove from the document path)Implements com. Returns a new ConfigDocument that is a copy of the current ConfigDocument, but with all values at the desired path removed. |
| public ConfigDocument | withValue(String
the path at which to set the desired value path, ConfigValue the value to set at the desired path, represented as a ConfigValue.
The rendered text of the ConfigValue will be inserted into the
ConfigDocument. newValue)Implements com. Returns a new ConfigDocument that is a copy of the current ConfigDocument, but with the desired value set at the desired path. |
| public ConfigDocument | withValueText(String
the path at which to set the desired value path, String the value to set at the desired path, represented as a string. This
string will be parsed into a ConfigNode using the same options used to
parse the entire document, and the text will be inserted
as-is into the document. Leading and trailing comments, whitespace, or
newlines are not allowed, and if present an exception will be thrown.
If a concatenation is passed in for newValue but the document was parsed
with JSON, the first value in the concatenation will be parsed and inserted
into the ConfigDocument. newValue)Implements com. Returns a new ConfigDocument that is a copy of the current ConfigDocument, but with the desired value set at the desired path. |
| configNodeTree | back to summary |
|---|---|
| private ConfigNodeRoot configNodeTree | |
| parseOptions | back to summary |
|---|---|
| private ConfigParseOptions parseOptions | |
| SimpleConfigDocument | back to summary |
|---|---|
| pack-priv SimpleConfigDocument(ConfigNodeRoot parsedNode, ConfigParseOptions parseOptions) | |
| equals | back to summary |
|---|---|
| public boolean equals(Object other) Overrides java. Doc from java. Indicates whether some other object is "equal to" this one.
The
An equivalence relation partitions the elements it operates on into equivalence classes; all the members of an equivalence class are equal to each other. Members of an equivalence class are substitutable for each other, at least for some purposes. | |
| hashCode | back to summary |
|---|---|
| public int hashCode() Overrides java. Doc from java. Returns a hash code value for this object. This method is
supported for the benefit of hash tables such as those provided by
The general contract of
| |
| hasPath | back to summary |
|---|---|
| public boolean hasPath(String path) Implements com. Doc from com. Returns a boolean indicating whether or not a ConfigDocument has a value at the desired path. null counts as a value for purposes of this check. | |
| render | back to summary |
|---|---|
| public String render() Implements com. Doc from com. The original text of the input, modified if necessary with any replaced or added values.
| |
| withoutPath | back to summary |
|---|---|
| public ConfigDocument withoutPath(String path) Implements com. Doc from com. Returns a new ConfigDocument that is a copy of the current ConfigDocument, but with all values at the desired path removed. If the path does not exist in the document, a copy of the current document will be returned. If there is an array at the root, an exception will be thrown.
| |
| withValue | back to summary |
|---|---|
| public ConfigDocument withValue(String path, ConfigValue newValue) Implements com. Doc from com. Returns a new ConfigDocument that is a copy of the current
ConfigDocument, but with the desired value set at the
desired path. Works like
| |
| withValueText | back to summary |
|---|---|
| public ConfigDocument withValueText(String path, String newValue) Implements com. Doc from com. Returns a new ConfigDocument that is a copy of the current ConfigDocument, but with the desired value set at the desired path. If the path exists, it will remove all duplicates before the final occurrence of the path, and replace the value at the final occurrence of the path. If the path does not exist, it will be added. If the document has an array as the root value, an exception will be thrown.
| |