| Constructor and Description |
|---|
Section(IniFile.Section section)
Copy-constructor.
|
Section(String name)
Creates a section of the given name.
|
| Modifier and Type | Method and Description |
|---|---|
IniFile.Section |
add(IniFile.Section section)
Adds all properties from 'section' into this one.
|
IniFile.Section |
add(String key,
String value)
Adds a property key=value into the section.
|
IniFile.Section |
add(String key,
String value,
String comment)
Adds a property key=value into the section with comment.
|
void |
addComment(String comment)
Adds comment to this section.
|
void |
addComment(String keyValueCommented,
String comment) |
IniFile.Section |
clear()
Deletes all properties within this section.
|
IniFile.Section |
clearComments()
Deletes all comments within this section.
|
boolean |
containsKey(String key)
Whether the section contains property of the given key.
|
List<String> |
getAll(String key)
Returns a value of the propety with 'key'.
|
IniFile.SectionEntryKeyValue |
getEntry(String key)
Returns full section entry for a 'key'.
|
Set<String> |
getKeys()
Returns all keys stored within the map.
|
String |
getName()
Returns name of the section.
|
String |
getOne(String key)
Returns a value of the propety with 'key'.
|
Set<String> |
keySet()
Alias for
getKeys(). |
void |
output(PrintWriter writer)
Writes this section into the writer.
|
IniFile.Section |
put(String key,
String value)
Sets a property key=value into the section.
|
IniFile.Section |
put(String key,
String value,
String comment)
Sets a property key=value into the section with comment.
|
IniFile.SectionEntryKeyValue |
remove(String key)
Removes a property under the 'key' from this section.
|
IniFile.Section |
set(String key,
String value)
Alias for
put(String, String). |
IniFile.Section |
set(String key,
String value,
String comment)
Alias for
Section#put(String, Strin, String). |
String |
toString() |
public Section(String name)
Name can't be null!
name - public Section(IniFile.Section section)
section - public String getName()
public IniFile.Section put(String key, String value)
key - value - public IniFile.Section put(String key, String value, String comment)
key - value - comment - public IniFile.Section add(String key, String value)
key - value - public IniFile.Section add(String key, String value, String comment)
key - value - comment - public String getOne(String key)
key - public List<String> getAll(String key)
key - public IniFile.SectionEntryKeyValue getEntry(String key)
key - public boolean containsKey(String key)
key - public IniFile.SectionEntryKeyValue remove(String key)
key - IniFile.SectionEntryKeyValuepublic IniFile.Section clear()
public IniFile.Section clearComments()
public IniFile.Section set(String key, String value)
put(String, String).key - value - public IniFile.Section set(String key, String value, String comment)
Section#put(String, Strin, String).key - value - comment - public void addComment(String comment)
comment - public IniFile.Section add(IniFile.Section section)
section - public void output(PrintWriter writer)
writer - Copyright © 2019 AMIS research group, Faculty of Mathematics and Physics, Charles University in Prague, Czech Republic. All rights reserved.