mirror of
https://github.com/dmulloy2/ProtocolLib.git
synced 2025-01-03 23:18:05 +01:00
Added the ability to enumerate IntEnums.
This commit is contained in:
parent
cecab6a169
commit
f8bd36bf3c
@ -1,6 +1,7 @@
|
|||||||
package com.comphenix.protocol.reflect;
|
package com.comphenix.protocol.reflect;
|
||||||
|
|
||||||
import java.lang.reflect.Field;
|
import java.lang.reflect.Field;
|
||||||
|
import java.util.Set;
|
||||||
|
|
||||||
import com.google.common.collect.BiMap;
|
import com.google.common.collect.BiMap;
|
||||||
import com.google.common.collect.HashBiMap;
|
import com.google.common.collect.HashBiMap;
|
||||||
@ -76,4 +77,12 @@ public class IntEnum {
|
|||||||
public String getDeclaredName(Integer id) {
|
public String getDeclaredName(Integer id) {
|
||||||
return members.get(id);
|
return members.get(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Retrieve the ID of every registered member.
|
||||||
|
* @return Enumeration of every value.
|
||||||
|
*/
|
||||||
|
public Set<Integer> values() {
|
||||||
|
return members.keySet();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user