@@ -0,0 +1,1690 @@
+package com.blarg.gdx;%0A%0A// this class exists because i am stupid and can never remember the operators used for setting/clearing/toggling bits%0A%0Apublic final class Bitfield %7B%0A%09public static boolean isSet(long bit, long bitfield) %7B%0A%09%09return (bitfield & bit) != 0;%0A%09%7D%0A%0A%09public static boolean isSet(int bit, int bitfield) %7B%0A%09%09return (bitfield & bit) != 0;%0A%09%7D%0A%0A%09public static boolean isSet(short bit, short bitfield) %7B%0A%09%09return (bitfield & bit) != 0;%0A%09%7D%0A%0A%09public static boolean isSet(byte bit, byte bitfield) %7B%0A%09%09return (bitfield & bit) != 0;%0A%09%7D%0A%0A%09public static long set(long bit, long bitfield) %7B%0A%09%09bitfield %7C= bit;%0A%09%09return (bitfield %7C bit);%0A%09%7D%0A%0A%09public static int set(int bit, int bitfield) %7B%0A%09%09bitfield %7C= bit;%0A%09%09return bitfield;%0A%09%7D%0A%0A%09public static short set(short bit, short bitfield) %7B%0A%09%09bitfield %7C= bit;%0A%09%09return bitfield;%0A%09%7D%0A%0A%09public static byte set(byte bit, byte bitfield) %7B%0A%09%09bitfield %7C= bit;%0A%09%09return bitfield;%0A%09%7D%0A%0A%09public static long clear(long bit, long bitfield) %7B%0A%09%09bitfield &= ~bit;%0A%09%09return bitfield;%0A%09%7D%0A%0A%09public static int clear(int bit, int bitfield) %7B%0A%09%09bitfield &= ~bit;%0A%09%09return bitfield;%0A%09%7D%0A%0A%09public static short clear(short bit, short bitfield) %7B%0A%09%09bitfield &= ~bit;%0A%09%09return bitfield;%0A%09%7D%0A%0A%09public static byte clear(byte bit, byte bitfield) %7B%0A%09%09bitfield &= ~bit;%0A%09%09return bitfield;%0A%09%7D%0A%0A%09public static long toggle(long bit, long bitfield) %7B%0A%09%09bitfield %5E= bit;%0A%09%09return bitfield;%0A%09%7D%0A%0A%09public static int toggle(int bit, int bitfield) %7B%0A%09%09bitfield %5E= bit;%0A%09%09return bitfield;%0A%09%7D%0A%0A%09public static short toggle(short bit, short bitfield) %7B%0A%09%09bitfield %5E= bit;%0A%09%09return bitfield;%0A%09%7D%0A%0A%09public static byte toggle(byte bit, byte bitfield) %7B%0A%09%09bitfield %5E= bit;%0A%09%09return bitfield;%0A%09%7D%0A%7D%0A

add bitfield helper class