35
35
*/
36
36
public interface KeyValue {
37
37
38
+ /**
39
+ * Inserts or replaces {@code boolean} value for the specified key.
40
+ *
41
+ * @param key the key to be placed into this {@code KeyValue} object
42
+ * @param value the value corresponding to <tt>key</tt>
43
+ */
44
+ KeyValue put (String key , boolean value );
45
+
38
46
/**
39
47
* Inserts or replaces {@code short} value for the specified key.
40
48
*
@@ -75,6 +83,27 @@ public interface KeyValue {
75
83
*/
76
84
KeyValue put (String key , String value );
77
85
86
+ /**
87
+ * Searches for the {@code boolean} property with the specified key in this {@code KeyValue} object. If the key is
88
+ * not found in this property list, false is returned.
89
+ *
90
+ * @param key the property key
91
+ * @return the value in this {@code KeyValue} object with the specified key value
92
+ * @see #put(String, boolean)
93
+ */
94
+ boolean getBoolean (String key );
95
+
96
+ /**
97
+ * Searches for the {@code boolean} property with the specified key in this {@code KeyValue} object. If the key is
98
+ * not found in this property list, false is returned.
99
+ *
100
+ * @param key the property key
101
+ * @param defaultValue a default value
102
+ * @return the value in this {@code KeyValue} object with the specified key value
103
+ * @see #put(String, boolean)
104
+ */
105
+ boolean getBoolean (String key , boolean defaultValue );
106
+
78
107
/**
79
108
* Searches for the {@code short} property with the specified key in this {@code KeyValue} object. If the key is not
80
109
* found in this property list, zero is returned.
@@ -106,17 +135,6 @@ public interface KeyValue {
106
135
*/
107
136
int getInt (String key );
108
137
109
- /**
110
- * Searches for the {@code int} property with the specified key in this {@code KeyValue} object. If the key is not
111
- * found in this property list, the default value argument is returned.
112
- *
113
- * @param key the property key
114
- * @param defaultValue a default value
115
- * @return the value in this {@code KeyValue} object with the specified key value
116
- * @see #put(String, int)
117
- */
118
- int getInt (String key , int defaultValue );
119
-
120
138
/**
121
139
* Searches for the {@code long} property with the specified key in this {@code KeyValue} object. If the key is not
122
140
* found in this property list, zero is returned.
@@ -148,17 +166,6 @@ public interface KeyValue {
148
166
*/
149
167
double getDouble (String key );
150
168
151
- /**
152
- * Searches for the {@code double} property with the specified key in this {@code KeyValue} object. If the key is
153
- * not found in this property list, the default value argument is returned.
154
- *
155
- * @param key the property key
156
- * @param defaultValue a default value
157
- * @return the value in this {@code KeyValue} object with the specified key value
158
- * @see #put(String, double)
159
- */
160
- double getDouble (String key , double defaultValue );
161
-
162
169
/**
163
170
* Searches for the {@code String} property with the specified key in this {@code KeyValue} object. If the key is
164
171
* not found in this property list, {@code null} is returned.
@@ -169,17 +176,6 @@ public interface KeyValue {
169
176
*/
170
177
String getString (String key );
171
178
172
- /**
173
- * Searches for the {@code String} property with the specified key in this {@code KeyValue} object. If the key is
174
- * not found in this property list, the default value argument is returned.
175
- *
176
- * @param key the property key
177
- * @param defaultValue a default value
178
- * @return the value in this {@code KeyValue} object with the specified key value
179
- * @see #put(String, String)
180
- */
181
- String getString (String key , String defaultValue );
182
-
183
179
/**
184
180
* Returns a {@link Set} view of the keys contained in this {@code KeyValue} object.
185
181
* <p>
0 commit comments