-
Notifications
You must be signed in to change notification settings - Fork 1
/
FileBuilder.java
119 lines (97 loc) · 1.99 KB
/
FileBuilder.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
class FileBuilder {
/**
* constructor
* @param path file path
* @param file file name
*/
FileBuilder(String path, String file);
/**
* @param path path
* @param value value
*/
FileBuilder set(String path, Object value);
FileBuilder save();
/**
* @param path path
* @param value value
*/
FileBuilder addDefault(String path, Object value);
/**
* @param keys keyset
*/
FileBuilder copyDefaults(boolean copyDefaults);
/**
* @return File
*/
File getFile();
void reload();
/**
* @return true if file exists
*/
boolean exists();
/**
* @param value value
* @return true if file contains value
*/
boolean contains(String value);
/**
* @param path path
* @return object from path
*/
Object getObject(String path);
/**
* @param path path
* @return String from path
*/
String getString(String path);
/**
* @param path path
* @return int from path
*/
int getInt(String path);
/**
* @param path path
* @return double from path
*/
double getDouble(String path);
/**
* @param path path
* @return long from path
*/
long getLong(String path);
/**
* @param path path
* @return boolean from path
*/
boolean getBoolean(String path);
/**
* @param path path
* @return list of Strings from path
*/
List<String> getStringList(String path);
/**
* @param path path
* @return list of booleans from path
*/
List<Boolean> getBooleanList(String path);
/**
* @param path path
* @return list of doubles from path
*/
List<Double> getDoubleList(String path);
/**
* @param path path
* @return list of ints from path
*/
List<Integer> getIntegerList(String path);
/**
* @param keys keyset
* @return set of keyset
*/
Set<String> getKeys(boolean keys);
/**
* @param section section
*/
ConfigurationSection getConfigurationSection(String section);
void delete();
}