@@ -77,7 +77,7 @@ public StringDict(String[] keys, String[] values) {
7777
7878 /**
7979 * @webref stringdict:method
80- * @brief To come...
80+ * @brief Returns the number of key/value pairs
8181 */
8282 public int size () {
8383 return count ;
@@ -120,7 +120,7 @@ protected void crop() {
120120
121121 /**
122122 * @webref stringdict:method
123- * @brief To come...
123+ * @brief Return the internal array being used to store the keys
124124 */
125125 public Iterable <String > keys () {
126126 return new Iterable <String >() {
@@ -173,7 +173,7 @@ public String value(int index) {
173173
174174 /**
175175 * @webref stringdict:method
176- * @brief To come...
176+ * @brief Return the internal array being used to store the values
177177 */
178178 public Iterable <String > values () {
179179 return new Iterable <String >() {
@@ -206,7 +206,7 @@ public boolean hasNext() {
206206 * @webref stringdict:method
207207 * @brief Create a new array and copy each of the values into it
208208 */
209- public int [] valueArray () {
209+ public String [] valueArray () {
210210 return valueArray (null );
211211 }
212212
@@ -216,9 +216,9 @@ public int[] valueArray() {
216216 * creating a new array each time). If 'array' is null, or not the same
217217 * size as the number of values, a new array will be allocated and returned.
218218 */
219- public int [] valueArray (int [] array ) {
219+ public String [] valueArray (String [] array ) {
220220 if (array == null || array .length != size ()) {
221- array = new int [count ];
221+ array = new String [count ];
222222 }
223223 System .arraycopy (values , 0 , array , 0 , count );
224224 return array ;
@@ -239,7 +239,7 @@ public String get(String key) {
239239
240240 /**
241241 * @webref stringdict:method
242- * @brief To come...
242+ * @brief Create a new key/value pair or change the value of one
243243 */
244244 public void set (String key , String amount ) {
245245 int index = index (key );
@@ -258,7 +258,7 @@ public int index(String what) {
258258
259259 /**
260260 * @webref stringdict:method
261- * @brief To come...
261+ * @brief Check if a key is a part of the data structure
262262 */
263263 public boolean hasKey (String key ) {
264264 return index (key ) != -1 ;
@@ -278,7 +278,7 @@ protected void create(String key, String value) {
278278
279279 /**
280280 * @webref stringdict:method
281- * @brief To come...
281+ * @brief Remove a key/value pair
282282 */
283283 public void remove (String key ) {
284284 removeIndex (index (key ));
@@ -325,7 +325,7 @@ public void sortKeys() {
325325
326326 /**
327327 * @webref stringdict:method
328- * @brief To come...
328+ * @brief Sort the keys alphabetially in reverse
329329 */
330330 public void sortKeysReverse () {
331331 sortImpl (true , true );
@@ -336,7 +336,7 @@ public void sortKeysReverse() {
336336 * Sort by values in descending order (largest value will be at [0]).
337337 *
338338 * @webref stringdict:method
339- * @brief Sort by values in descending order
339+ * @brief Sort by values in ascending order
340340 */
341341 public void sortValues () {
342342 sortImpl (false , false );
@@ -345,7 +345,7 @@ public void sortValues() {
345345
346346 /**
347347 * @webref stringdict:method
348- * @brief To come...
348+ * @brief Sort by values in descending order
349349 */
350350 public void sortValuesReverse () {
351351 sortImpl (false , true );
0 commit comments