/*
 * Copyright (c) 2016-2017, Adam <Adam@sigterm.info>
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *
 * 1. Redistributions of source code must retain the above copyright notice, this
 *    list of conditions and the following disclaimer.
 * 2. Redistributions in binary form must reproduce the above copyright notice,
 *    this list of conditions and the following disclaimer in the documentation
 *    and/or other materials provided with the distribution.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
 * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */
package net.runelite.api;

import java.util.HashMap;
import java.util.Map;

public enum ClanMemberRank
{
	UNRANKED((byte) -1),
	FRIEND((byte) 0),
	RECRUIT((byte) 1),
	CORPORAL((byte) 2),
	SERGEANT((byte) 3),
	LIEUTENANT((byte) 4),
	CAPTAIN((byte) 5),
	GENERAL((byte) 6),
	OWNER((byte) 7);

	private static final Map<Byte, ClanMemberRank> BYTE_TO_RANK = new HashMap<>();

	static
	{
		for (final ClanMemberRank clanMemberRank : ClanMemberRank.values())
		{
			BYTE_TO_RANK.put(clanMemberRank.value, clanMemberRank);
		}
	}

	public static ClanMemberRank valueOf(byte rank)
	{
		return BYTE_TO_RANK.get(rank);
	}

	private final byte value;

	ClanMemberRank(final byte value)
	{
		this.value = value;
	}

	public byte getValue()
	{
		return value;
	}
}

@@ -1453,16 +1453,100 @@
 il.Map;%0A
+import lombok.AllArgsConstructor;%0Aimport lombok.Getter;%0A%0A@AllArgsConstructor%0A@Getter
 %0Apublic 
@@ -1577,23 +1577,16 @@
 NRANKED(
-(byte) 
 -1),%0A%09FR
@@ -1590,23 +1590,16 @@
 %09FRIEND(
-(byte) 
 0),%0A%09REC
@@ -1603,23 +1603,16 @@
 RECRUIT(
-(byte) 
 1),%0A%09COR
@@ -1617,23 +1617,16 @@
 ORPORAL(
-(byte) 
 2),%0A%09SER
@@ -1631,23 +1631,16 @@
 ERGEANT(
-(byte) 
 3),%0A%09LIE
@@ -1647,23 +1647,16 @@
 UTENANT(
-(byte) 
 4),%0A%09CAP
@@ -1660,23 +1660,16 @@
 CAPTAIN(
-(byte) 
 5),%0A%09GEN
@@ -1673,23 +1673,16 @@
 GENERAL(
-(byte) 
 6),%0A%09OWN
@@ -1688,15 +1688,8 @@
 NER(
-(byte) 
 7);%0A
@@ -1719,12 +1719,15 @@
 Map%3C
-Byte
+Integer
 , Cl
@@ -1740,28 +1740,21 @@
 erRank%3E 
-BYTE_TO_
 RANK
+S
  = new H
@@ -1854,28 +1854,21 @@
 %0A%09%09%7B%0A%09%09%09
-BYTE_TO_
 RANK
+S
 .put(cla
@@ -1949,20 +1949,19 @@
 valueOf(
-byte
+int
  rank)%0A%09
@@ -1975,20 +1975,13 @@
 urn 
-BYTE_TO_
 RANK
+S
 .get
@@ -2011,128 +2011,17 @@
 nal 
-byte value;%0A%0A%09ClanMemberRank(final byte value)%0A%09%7B%0A%09%09this.value = value;%0A%09%7D%0A%0A%09public byte getValue()%0A%09%7B%0A%09%09return value;%0A%09%7D
+int value;
 %0A%7D%0A

update ClanMemberRank to use int