package grabber;

/**
 * Contains utility methods and final arrays for the OSRS hiscore package
 * 
 * @author Dylan Weaver
 *
 */
public final class Utility {

	// An array of every skill in old school runescape
	static final String[] skills = { "overall", "attack", "defence", "strength", "hitpoints", "ranged", "prayer",
			"magic", "cooking", "woodcutting", "fletching", "fishing", "firemaking", "crafting", "smithing", "mining",
			"herblore", "agility", "thieving", "slayer", "farming", "runecrafting", "hunter", "construction" };

	// An array of every ranked member
		static final String[] playersFinal = { "layor trop", "karambjohn", "nosteponsnek", "daft blunts", "rackle", "goondragon",
				"msmapes", "ecthelionii", "itiassacre", "uim pwc", "the package", "dragonsfury", "1488", "holly spring", "speshl",
				"texman", "toti594", "ludena", "figarothecat", "whiplash796", "picleboii", "bonghits", "itdoesnt", "the alomais", "tjommyt",
				"luch", "clint  3", "lostatonce", "sirartorian", "frofuzz", "yeex", "thatzally", "mr zoltan", "praisekek88",
				"monkfromhell", "megapanda87", "illegalaryan", "manlikeandy", "saucyturtle", "summonz", "masterchiefe", "r y l o c k",
				"uzil05", "drunkendunkn", "disco bisqit", "burningpraye", "fishy man555", "divorced man", "its footer", "semi vz", "derek 3 0",
				"wild life", "linkinpark69", "voatco", "dots anti", "jokerman557", "wordtm", "zakarius", "babashook", "fruitsaladz", "geepee",
				"capt balzak", "jjboy501", "robots222", "timeofgrace", "iron nasdaq", "ziekecijfers", "steve shives", "thicc ghost", "hopes gone",
				"18oo", "shakenspear", "bennie", "maclue vz", "megas deus", "thatlilium", "hapnin", "leckel", "el veneno 19", "lordaki",
				"l  s u", "silent_now", "xtra goofy", "irishfister", "kashflow", "freightxtank", "grypphus", "osse o", "haychedizzle", "very flacid",
				"valkyrien", "trickidy", "ktfowns", "bensonhedges" };

	/**
	 * A private constructor to ensure this class is not subclassed or messed with
	 * 
	 * @throws assertionError This class should not be instantiated
	 */
	private Utility() {
		throw new AssertionError("This class can not be instantiated.");
	}

	/**
	 * Determines which suffix to use at the end of a given position (st, th, nd, rd)
	 * 
	 * @param position The current position in an array being looped through
	 * @return A suffix to be appended to the position
	 */
	public final static String getPositionSuffix(int position) {
		if (position >= 11 && position <= 13) {
			return "th: ";
		} else {
			switch (position % 10) {
			case 1:
				return "st: ";
			case 2:
				return "nd: ";
			case 3:
				return "rd: ";
			default:
				return "th: ";
			}
		}
	}

	/**
	 * Determines if a number of arrays passed in are of the same length or not.
	 * 
	 * @param arrays A collection of arrays to check for length equality
	 * @return True if the arrays are all of the same length, false otherwise
	 */
	public static boolean areSameLength(Object[]... arrays) {
		int firstLength = arrays[0].length;
		for (Object[] playerData : arrays) {
			if (playerData.length != firstLength) {
				return false;
			}
		}
		return true;
	}
	
	/**
	 * Checks that {@code skill} is in {@code SKILL_NAMES}
	 * 
	 * @param str The string to check against {@code SKILL_NAMES}
	 */
	static boolean checkForValidSkill(String str) {
		for (int i = 0; i < skills.length; i++) {
			if (skills[i].equalsIgnoreCase(str)) {
				return true;
			}
		}
		return false;
	}
}

@@ -627,1302 +627,8 @@
  = %7B
- %22layor trop%22, %22karambjohn%22, %22nosteponsnek%22, %22daft blunts%22, %22rackle%22, %22goondragon%22,%0D%0A%09%09%09%09%22msmapes%22, %22ecthelionii%22, %22itiassacre%22, %22uim pwc%22, %22the package%22, %22dragonsfury%22, %221488%22, %22holly spring%22, %22speshl%22,%0D%0A%09%09%09%09%22texman%22, %22toti594%22, %22ludena%22, %22figarothecat%22, %22whiplash796%22, %22picleboii%22, %22bonghits%22, %22itdoesnt%22, %22the alomais%22, %22tjommyt%22,%0D%0A%09%09%09%09%22luch%22, %22clint  3%22, %22lostatonce%22, %22sirartorian%22, %22frofuzz%22, %22yeex%22, %22thatzally%22, %22mr zoltan%22, %22praisekek88%22,%0D%0A%09%09%09%09%22monkfromhell%22, %22megapanda87%22, %22illegalaryan%22, %22manlikeandy%22, %22saucyturtle%22, %22summonz%22, %22masterchiefe%22, %22r y l o c k%22,%0D%0A%09%09%09%09%22uzil05%22, %22drunkendunkn%22, %22disco bisqit%22, %22burningpraye%22, %22fishy man555%22, %22divorced man%22, %22its footer%22, %22semi vz%22, %22derek 3 0%22,%0D%0A%09%09%09%09%22wild life%22, %22linkinpark69%22, %22voatco%22, %22dots anti%22, %22jokerman557%22, %22wordtm%22, %22zakarius%22, %22babashook%22, %22fruitsaladz%22, %22geepee%22,%0D%0A%09%09%09%09%22capt balzak%22, %22jjboy501%22, %22robots222%22, %22timeofgrace%22, %22iron nasdaq%22, %22ziekecijfers%22, %22steve shives%22, %22thicc ghost%22, %22hopes gone%22,%0D%0A%09%09%09%09%2218oo%22, %22shakenspear%22, %22bennie%22, %22maclue vz%22, %22megas deus%22, %22thatlilium%22, %22hapnin%22, %22leckel%22, %22el veneno 19%22, %22lordaki%22,%0D%0A%09%09%09%09%22l  s u%22, %22silent_now%22, %22xtra goofy%22, %22irishfister%22, %22kashflow%22, %22freightxtank%22, %22grypphus%22, %22osse o%22, %22haychedizzle%22, %22very flacid%22,%0D%0A%09%09%09%09%22valkyrien%22, %22trickidy%22, %22ktfowns%22, %22bensonhedges%22 
 %7D;%0D%0A

Update Utility.java