Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package ua.demirug.consoleserver.connection;
- public enum ClientType {
- BOARD(0),
- CLIENT(1);
- private int id;
- private ClientType(int id) {
- this.id = id;
- }
- public int getID() {
- return this.id;
- }
- public static ClientType getbyID(int id) {
- if (id >= 0 && id <= 1) {
- return ClientType.values()[id];
- } else {
- return null;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement