public class IniOperatorDefault extends Object implements IniOperator
Constructor and Description |
---|
IniOperatorDefault() |
IniOperatorDefault(Sections sections) |
Modifier and Type | Method and Description |
---|---|
IniOperatorDefault |
add(String sectionName,
List<ValuePair> valuePairList)
添加所有的值对
|
<T> IniOperatorDefault |
add(String sectionName,
String key,
T value)
添加值,不关心是否有同名的
|
IniOperatorDefault |
add(String sectionName,
ValuePair valuePair)
添加值对
|
<T> T |
get(Class<T> tClass,
String sectionName,
String key)
读取值,如果有多个,则返回第一个
|
<T> T |
get(Class<T> tClass,
String sectionName,
String key,
T defaultValue)
获取值,如果读不到值,则取默认值
如果有多个,则只取第一个
|
String |
get(String sectionName,
String key) |
String |
get(String sectionName,
String key,
String defaultValue) |
<T> List<T> |
getList(Class<T> tClass,
String sectionName,
String key)
返回指定键值列表
|
Section |
getSection(String sectionName) |
Sections |
getSections() |
ValuePair |
getValuePair(String sectionName,
String key)
如果有多个,则会返回第一个
|
List<ValuePair> |
getValuePairList(String sectionName,
String key)
返回指定键的值对
|
<T> IniOperatorDefault |
put(String sectionName,
String key,
T value)
设置值,如果有同名的,则会被替换
|
void |
read(InputStream inputStream,
String charset)
读入配置信息
|
IniOperatorDefault |
set(String sectionName,
ValuePair valuePair)
如果有valuePair同名的key,则会替换
|
void |
setCommentChar(char commentChar) |
void |
setSections(Sections sections) |
void |
write( |