Skip to content

Commit 71c7539

Browse files
keySet
1 parent f803a5d commit 71c7539

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

JSONObject.java

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ of this software and associated documentation files (the "Software"), to deal
3737
import java.util.Locale;
3838
import java.util.Map;
3939
import java.util.ResourceBundle;
40+
import java.util.Set;
4041

4142
/**
4243
* A JSONObject is an unordered collection of name/value pairs. Its external
@@ -90,7 +91,7 @@ of this software and associated documentation files (the "Software"), to deal
9091
* </ul>
9192
*
9293
* @author JSON.org
93-
* @version 2012-10-26
94+
* @version 2012-10-27
9495
*/
9596
public class JSONObject {
9697

@@ -702,7 +703,17 @@ public boolean isNull(String key) {
702703
* @return An iterator of the keys.
703704
*/
704705
public Iterator keys() {
705-
return this.map.keySet().iterator();
706+
return this.keySet().iterator();
707+
}
708+
709+
710+
/**
711+
* Get a set of keys of the JSONObject.
712+
*
713+
* @return A keySet.
714+
*/
715+
public Set keySet() {
716+
return this.map.keySet();
706717
}
707718

708719

0 commit comments

Comments
 (0)