@BeanIgnore public class ConfigEvent extends Object
Modifier and Type | Method and Description |
---|---|
String |
getComment()
Returns the entry comment.
|
String |
getKey()
Returns the entry name.
|
String |
getModifiers()
Returns the modifiers on this entry.
|
List<String> |
getPreLines()
Returns the section or entry lines.
|
String |
getSection()
Returns the section name.
|
ConfigEventType |
getType()
Returns the event type.
|
String |
getValue()
Returns the entry value.
|
static ConfigEvent |
removeEntry(String section,
String key)
Removes a value from a configuration.
|
static ConfigEvent |
removeSection(String section)
Removes a section from the config.
|
static ConfigEvent |
setEntry(String section,
String key,
String value,
String modifiers,
String comment,
List<String> prelines)
Sets or replaces a value in a configuration.
|
static ConfigEvent |
setSection(String section,
List<String> prelines)
Adds a new empty section to the config.
|
String |
toString() |
public static ConfigEvent setEntry(String section, String key, String value, String modifiers, String comment, List<String> prelines)
section
- The section name.
key
- The entry name.
value
- The entry value.
comment
- Optional comment string to add on the same line as the entry.modifiers
- Optional entry modifiers.prelines
- Comment lines that occur before this entry.
ConfigEvent
object.public static ConfigEvent removeEntry(String section, String key)
section
- The section name.
key
- The entry name.
ConfigEvent
object.public static ConfigEvent setSection(String section, List<String> prelines)
section
- The section name.prelines
- Comment lines that occur before this section.
ConfigEvent
object.public static ConfigEvent removeSection(String section)
section
- The section name.ConfigEvent
object.public ConfigEventType getType()
public String getSection()
public String getComment()
public List<String> getPreLines()
public String getModifiers()
Copyright © 2018 Apache. All rights reserved.