summaryrefslogtreecommitdiff
path: root/NET/worlds/scape/EnumProperties.java
diff options
context:
space:
mode:
authorFuwn <[email protected]>2026-02-12 22:33:32 -0800
committerFuwn <[email protected]>2026-02-12 22:33:32 -0800
commitc7a9d4a6bd53ed7d61731770f2f10e8b9fd435f9 (patch)
treedf9f48bf128a6c0186a8e91857d6ff30fe0e9f18 /NET/worlds/scape/EnumProperties.java
downloadworldsplayer-c7a9d4a6bd53ed7d61731770f2f10e8b9fd435f9.tar.xz
worldsplayer-c7a9d4a6bd53ed7d61731770f2f10e8b9fd435f9.zip
Initial commit
Diffstat (limited to 'NET/worlds/scape/EnumProperties.java')
-rw-r--r--NET/worlds/scape/EnumProperties.java46
1 files changed, 46 insertions, 0 deletions
diff --git a/NET/worlds/scape/EnumProperties.java b/NET/worlds/scape/EnumProperties.java
new file mode 100644
index 0000000..a6fbdc9
--- /dev/null
+++ b/NET/worlds/scape/EnumProperties.java
@@ -0,0 +1,46 @@
+package NET.worlds.scape;
+
+import java.util.Enumeration;
+import java.util.NoSuchElementException;
+
+public class EnumProperties implements Enumeration<Object> {
+ private Properties props;
+ private Property next;
+ private int index = 0;
+
+ public EnumProperties(Object obj) {
+ if (obj instanceof Properties) {
+ this.props = (Properties)obj;
+ }
+ }
+
+ @Override
+ public boolean hasMoreElements() {
+ if (this.props != null && this.next == null) {
+ try {
+ this.next = (Property)this.props.properties(this.index++, 0, 0, null);
+
+ assert this.next.index == this.index - 1;
+ } catch (NoSuchPropertyException var2) {
+ }
+ }
+
+ return this.next != null;
+ }
+
+ @Override
+ public Object nextElement() {
+ if (this.hasMoreElements()) {
+ Property var2;
+ try {
+ var2 = this.next;
+ } finally {
+ this.next = null;
+ }
+
+ return var2;
+ } else {
+ throw new NoSuchElementException();
+ }
+ }
+}