Constructor and Description |
---|
IniFile.Section(IniFile.Section section)
Copy-constructor.
|
IniFile.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.
|
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.
|
String |
get(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.
|
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 IniFile.Section(String name)
Name can't be null!
name
- public IniFile.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 String get(String key)
key
- public IniFile.SectionEntryKeyValue getEntry(String key)
key
- public boolean containsKey(String key)
key
- public IniFile.SectionEntryKeyValue remove(String key)
key
- IniFile.SectionEntryKeyValue
public 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 © 2012 AMIS research group, Faculty of Mathematics and Physics, Charles University in Prague, Czech Republic. All Rights Reserved.