public class IntEnum extends Object
| Modifier and Type | Field and Description |
|---|---|
protected com.google.common.collect.BiMap<Integer,String> |
members |
| Constructor and Description |
|---|
IntEnum()
Registers every declared integer field.
|
| Modifier and Type | Method and Description |
|---|---|
String |
getDeclaredName(Integer id)
Retrieve the name of the member with the given id.
|
boolean |
hasMember(int id)
Determines whether or not the given member exists.
|
protected void |
registerAll()
Registers every public int field as a member.
|
protected void |
registerMember(int id,
String name)
Registers a member.
|
Integer |
valueOf(String name)
Retrieve the ID of the member with the given name.
|
Set<Integer> |
values()
Retrieve the ID of every registered member.
|
protected void registerAll()
protected void registerMember(int id,
String name)
id - - id of member.name - - name of member.public boolean hasMember(int id)
id - - the ID of the member to find.public Integer valueOf(String name)
name - - name of member to retrieve.public String getDeclaredName(Integer id)
id - - id of the member to retrieve.Copyright © 2012–2017 Comphenix and dmulloy2. Licensed under the GNU GPL v2.