test_class.declarator: XP_FOR_99 = 13_034_431
test_class.modifier: private static final
test_class.original_string: private static final int XP_FOR_99 = 13_034_431;
test_class.type: int
test_class.var_name: XP_FOR_99
test_class.declarator: XP_FOR_126 = 188_884_740
test_class.modifier: private static final
test_class.original_string: private static final int XP_FOR_126 = 188_884_740;
test_class.type: int
test_class.var_name: XP_FOR_126
test_class.file: runelite-api/src/test/java/net/runelite/api/ExperienceTest.java
test_class.identifier: ExperienceTest
test_case.body: @Test(expected = IllegalArgumentException.class)
  	public void testGetLevelForNegativeXP()
  	{
  		Experience.getLevelForXp(-1);
  	}
test_case.class_method_signature: ExperienceTest.testGetLevelForNegativeXP()
test_case.full_signature: @Test(expected = IllegalArgumentException.class) public void testGetLevelForNegativeXP()
test_case.identifier: testGetLevelForNegativeXP
test_case.invocations: getLevelForXp
test_case.modifiers: @Test(expected = IllegalArgumentException.class) public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testGetLevelForNegativeXP()
focal_class.declarator: MAX_REAL_LEVEL = 99
focal_class.modifier: public static final
focal_class.original_string: public static final int MAX_REAL_LEVEL = 99;
focal_class.type: int
focal_class.var_name: MAX_REAL_LEVEL
focal_class.declarator: MAX_VIRT_LEVEL = 126
focal_class.modifier: public static final
focal_class.original_string: public static final int MAX_VIRT_LEVEL = 126;
focal_class.type: int
focal_class.var_name: MAX_VIRT_LEVEL
focal_class.declarator: MAX_SKILL_XP = 200_000_000
focal_class.modifier: public static final
focal_class.original_string: public static final int MAX_SKILL_XP = 200_000_000;
focal_class.type: int
focal_class.var_name: MAX_SKILL_XP
focal_class.declarator: MAX_COMBAT_LEVEL = 126
focal_class.modifier: public static final
focal_class.original_string: public static final int MAX_COMBAT_LEVEL = 126;
focal_class.type: int
focal_class.var_name: MAX_COMBAT_LEVEL
focal_class.declarator: XP_FOR_LEVEL = new int[MAX_VIRT_LEVEL]
focal_class.modifier: private static final
focal_class.original_string: private static final int[] XP_FOR_LEVEL = new int[MAX_VIRT_LEVEL];
focal_class.type: int[]
focal_class.var_name: XP_FOR_LEVEL
focal_class.file: runelite-api/src/main/java/net/runelite/api/Experience.java
focal_class.identifier: Experience
focal_class.class_method_signature: Experience.getXpForLevel(int level)
focal_class.full_signature: public static int getXpForLevel(int level)
focal_class.identifier: getXpForLevel
focal_class.modifiers: public static
focal_class.parameters: (int level)
focal_class.return: int
focal_class.signature: int getXpForLevel(int level)
focal_class.class_method_signature: Experience.getLevelForXp(int xp)
focal_class.full_signature: public static int getLevelForXp(int xp)
focal_class.identifier: getLevelForXp
focal_class.modifiers: public static
focal_class.parameters: (int xp)
focal_class.return: int
focal_class.signature: int getLevelForXp(int xp)
focal_class.class_method_signature: Experience.getMeleeRangeOrMagicCombatLevelContribution(int attackLevel, int strengthLevel, int magicLevel, int rangeLevel)
focal_class.full_signature: private static double getMeleeRangeOrMagicCombatLevelContribution(int attackLevel, int strengthLevel, int magicLevel, int rangeLevel)
focal_class.identifier: getMeleeRangeOrMagicCombatLevelContribution
focal_class.modifiers: private static
focal_class.parameters: (int attackLevel, int strengthLevel, int magicLevel, int rangeLevel)
focal_class.return: double
focal_class.signature: double getMeleeRangeOrMagicCombatLevelContribution(int attackLevel, int strengthLevel, int magicLevel, int rangeLevel)
focal_class.class_method_signature: Experience.getCombatLevelPrecise(int attackLevel, int strengthLevel,
  		int defenceLevel, int hitpointsLevel, int magicLevel,
  		int rangeLevel, int prayerLevel)
focal_class.full_signature: public static double getCombatLevelPrecise(int attackLevel, int strengthLevel,
  		int defenceLevel, int hitpointsLevel, int magicLevel,
  		int rangeLevel, int prayerLevel)
focal_class.identifier: getCombatLevelPrecise
focal_class.modifiers: public static
focal_class.parameters: (int attackLevel, int strengthLevel,
  		int defenceLevel, int hitpointsLevel, int magicLevel,
  		int rangeLevel, int prayerLevel)
focal_class.return: double
focal_class.signature: double getCombatLevelPrecise(int attackLevel, int strengthLevel,
  		int defenceLevel, int hitpointsLevel, int magicLevel,
  		int rangeLevel, int prayerLevel)
focal_class.class_method_signature: Experience.getCombatLevel(int attackLevel, int strengthLevel,
  		int defenceLevel, int hitpointsLevel, int magicLevel,
  		int rangeLevel, int prayerLevel)
focal_class.full_signature: public static int getCombatLevel(int attackLevel, int strengthLevel,
  		int defenceLevel, int hitpointsLevel, int magicLevel,
  		int rangeLevel, int prayerLevel)
focal_class.identifier: getCombatLevel
focal_class.modifiers: public static
focal_class.parameters: (int attackLevel, int strengthLevel,
  		int defenceLevel, int hitpointsLevel, int magicLevel,
  		int rangeLevel, int prayerLevel)
focal_class.return: int
focal_class.signature: int getCombatLevel(int attackLevel, int strengthLevel,
  		int defenceLevel, int hitpointsLevel, int magicLevel,
  		int rangeLevel, int prayerLevel)
focal_class.class_method_signature: Experience.getNextCombatLevelMelee(int attackLevel, int strengthLevel, int defenceLevel, int hitpointsLevel,
  		int magicLevel, int rangeLevel, int prayerLevel)
focal_class.full_signature: public static int getNextCombatLevelMelee(int attackLevel, int strengthLevel, int defenceLevel, int hitpointsLevel,
  		int magicLevel, int rangeLevel, int prayerLevel)
focal_class.identifier: getNextCombatLevelMelee
focal_class.modifiers: public static
focal_class.parameters: (int attackLevel, int strengthLevel, int defenceLevel, int hitpointsLevel,
  		int magicLevel, int rangeLevel, int prayerLevel)
focal_class.return: int
focal_class.signature: int getNextCombatLevelMelee(int attackLevel, int strengthLevel, int defenceLevel, int hitpointsLevel,
  		int magicLevel, int rangeLevel, int prayerLevel)
focal_class.class_method_signature: Experience.getNextCombatLevelHpDef(int attackLevel, int strengthLevel, int defenceLevel, int hitpointsLevel,
  		int magicLevel, int rangeLevel, int prayerLevel)
focal_class.full_signature: public static int getNextCombatLevelHpDef(int attackLevel, int strengthLevel, int defenceLevel, int hitpointsLevel,
  		int magicLevel, int rangeLevel, int prayerLevel)
focal_class.identifier: getNextCombatLevelHpDef
focal_class.modifiers: public static
focal_class.parameters: (int attackLevel, int strengthLevel, int defenceLevel, int hitpointsLevel,
  		int magicLevel, int rangeLevel, int prayerLevel)
focal_class.return: int
focal_class.signature: int getNextCombatLevelHpDef(int attackLevel, int strengthLevel, int defenceLevel, int hitpointsLevel,
  		int magicLevel, int rangeLevel, int prayerLevel)
focal_class.class_method_signature: Experience.getNextCombatLevelMagic(int attackLevel, int strengthLevel, int defenceLevel, int hitpointsLevel,
  		int magicLevel, int rangeLevel, int prayerLevel)
focal_class.full_signature: public static int getNextCombatLevelMagic(int attackLevel, int strengthLevel, int defenceLevel, int hitpointsLevel,
  		int magicLevel, int rangeLevel, int prayerLevel)
focal_class.identifier: getNextCombatLevelMagic
focal_class.modifiers: public static
focal_class.parameters: (int attackLevel, int strengthLevel, int defenceLevel, int hitpointsLevel,
  		int magicLevel, int rangeLevel, int prayerLevel)
focal_class.return: int
focal_class.signature: int getNextCombatLevelMagic(int attackLevel, int strengthLevel, int defenceLevel, int hitpointsLevel,
  		int magicLevel, int rangeLevel, int prayerLevel)
focal_class.class_method_signature: Experience.getNextCombatLevelRange(int attackLevel, int strengthLevel, int defenceLevel, int hitpointsLevel,
  		int magicLevel, int rangeLevel, int prayerLevel)
focal_class.full_signature: public static int getNextCombatLevelRange(int attackLevel, int strengthLevel, int defenceLevel, int hitpointsLevel,
  		int magicLevel, int rangeLevel, int prayerLevel)
focal_class.identifier: getNextCombatLevelRange
focal_class.modifiers: public static
focal_class.parameters: (int attackLevel, int strengthLevel, int defenceLevel, int hitpointsLevel,
  		int magicLevel, int rangeLevel, int prayerLevel)
focal_class.return: int
focal_class.signature: int getNextCombatLevelRange(int attackLevel, int strengthLevel, int defenceLevel, int hitpointsLevel,
  		int magicLevel, int rangeLevel, int prayerLevel)
focal_class.class_method_signature: Experience.getNextCombatLevelPrayer(int attackLevel, int strengthLevel, int defenceLevel, int hitpointsLevel,
  		int magicLevel, int rangeLevel, int prayerLevel)
focal_class.full_signature: public static int getNextCombatLevelPrayer(int attackLevel, int strengthLevel, int defenceLevel, int hitpointsLevel,
  		int magicLevel, int rangeLevel, int prayerLevel)
focal_class.identifier: getNextCombatLevelPrayer
focal_class.modifiers: public static
focal_class.parameters: (int attackLevel, int strengthLevel, int defenceLevel, int hitpointsLevel,
  		int magicLevel, int rangeLevel, int prayerLevel)
focal_class.return: int
focal_class.signature: int getNextCombatLevelPrayer(int attackLevel, int strengthLevel, int defenceLevel, int hitpointsLevel,
  		int magicLevel, int rangeLevel, int prayerLevel)
focal_method.body: public static int getLevelForXp(int xp)
  	{
  		if (xp < 0)
  		{
  			throw new IllegalArgumentException("XP (" + xp + ") must not be negative");
  		}
  
  		int low = 0;
  		int high = XP_FOR_LEVEL.length - 1;
  
  		while (low <= high)
  		{
  			int mid = low + (high - low) / 2;
  			int xpForLevel = XP_FOR_LEVEL[mid];
  
  			if (xp < xpForLevel)
  			{
  				high = mid - 1;
  			}
  			else if (xp > xpForLevel)
  			{
  				low = mid + 1;
  			}
  			else
  			{
  				return mid + 1;
  			}
  		}
  
  		return high + 1;
  	}
focal_method.class_method_signature: Experience.getLevelForXp(int xp)
focal_method.full_signature: public static int getLevelForXp(int xp)
focal_method.identifier: getLevelForXp
focal_method.modifiers: public static
focal_method.parameters: (int xp)
focal_method.return: int
focal_method.signature: int getLevelForXp(int xp)