Browse Source

Delete stuff I don't use

smelc 6 years ago
parent
commit
3dc0576248

+ 0 - 182
squidlib-util/src/main/java/squidpony/Maker.java

@@ -1,182 +0,0 @@
-package squidpony;
-
-import squidpony.squidmath.OrderedMap;
-import squidpony.squidmath.OrderedSet;
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.LinkedHashMap;
-import java.util.LinkedHashSet;
-
-/**
- * Utility methods for more easily constructing data structures, particularly those in Java's standard library.
- * All static methods and inner classes; meant to be imported with {@code import static squidpony.Maker.*}.
- * Created by Tommy Ettinger on 5/19/2016.
- */
-public class Maker {
-
-    /**
-     * Stores any information relating to non-fatal issues, such as caught and handled Exceptions that still change the
-     * behavior of methods. Typically shouldn't be cleared while debugging, since it could be useful later on, and
-     * hopefully won't need to be written to in a release build.
-     */
-    public static final StringBuilder issueLog = new StringBuilder(1024);
-    /**
-     * Makes a LinkedHashMap (LHM) with key and value types inferred from the types of k0 and v0, and considers all
-     * parameters key-value pairs, casting the Objects at positions 0, 2, 4... etc. to K and the objects at positions
-     * 1, 3, 5... etc. to V. If rest has an odd-number length, then it discards the last item. If any pair of items in
-     * rest cannot be cast to the correct type of K or V, then this inserts nothing for that pair and logs information
-     * on the problematic pair to the static Maker.issueLog field.
-     * @param k0 the first key; used to infer the types of other keys if generic parameters aren't specified.
-     * @param v0 the first value; used to infer the types of other values if generic parameters aren't specified.
-     * @param rest an array or vararg of keys and values in pairs; should contain alternating K, V, K, V... elements
-     * @param <K> the type of keys in the returned LinkedHashMap; if not specified, will be inferred from k0
-     * @param <V> the type of values in the returned LinkedHashMap; if not specified, will be inferred from v0
-     * @return a freshly-made LinkedHashMap with K keys and V values, using k0, v0, and the contents of rest to fill it
-     */
-    @SuppressWarnings("unchecked")
-    public static <K, V> LinkedHashMap<K, V> makeLHM(K k0, V v0, Object... rest)
-    {
-        if(rest == null)
-            return makeLHM(k0, v0);
-        LinkedHashMap<K, V> lhm = new LinkedHashMap<>(1 + (rest.length / 2));
-        lhm.put(k0, v0);
-
-        for (int i = 0; i < rest.length - 1; i+=2) {
-            try {
-                lhm.put((K) rest[i], (V) rest[i + 1]);
-            }catch (ClassCastException cce) {
-                issueLog.append("makeLHM call had a casting problem with pair at rest[");
-                issueLog.append(i);
-                issueLog.append("] and/or rest[");
-                issueLog.append(i + 1);
-                issueLog.append("], with contents: ");
-                issueLog.append(rest[i]);
-                issueLog.append(", ");
-                issueLog.append(rest[i+1]);
-                issueLog.append(".\n\nException messages:\n");
-                issueLog.append(cce);
-                String msg = cce.getMessage();
-                if (msg != null) {
-                    issueLog.append('\n');
-                    issueLog.append(msg);
-                }
-                issueLog.append('\n');
-            }
-        }
-        return lhm;
-    }
-
-    /**
-     * Makes an empty LinkedHashMap (LHM); needs key and value types to be specified in order to work. For an empty
-     * LinkedHashMap with String keys and Coord values, you could use {@code Maker.<String, Coord>makeLHM();}. Using
-     * the new keyword is probably just as easy in this case; this method is provided for completeness relative to
-     * makeLHM() with 2 or more parameters.
-     * @param <K> the type of keys in the returned LinkedHashMap; cannot be inferred and must be specified
-     * @param <V> the type of values in the returned LinkedHashMap; cannot be inferred and must be specified
-     * @return an empty LinkedHashMap with the given key and value types.
-     */
-    public static <K, V> LinkedHashMap<K, V> makeLHM()
-    {
-        return new LinkedHashMap<>();
-    }
-
-    /**
-     * Makes an ArrayList of T given an array or vararg of T elements.
-     * @param elements an array or vararg of T
-     * @param <T> just about any non-primitive type
-     * @return a newly-allocated ArrayList containing all of elements, in order
-     */
-    public static <T> ArrayList<T> makeList(T... elements) {
-        if(elements == null) return null;
-        ArrayList<T> list = new ArrayList<>(elements.length);
-        Collections.addAll(list, elements);
-        return list;
-    }
-
-    /**
-     * Makes a LinkedHashSet (LHS) of T given an array or vararg of T elements. Duplicate items in elements will have
-     * all but one item discarded, using the later item in elements.
-     * @param elements an array or vararg of T
-     * @param <T> just about any non-primitive type
-     * @return a newly-allocated LinkedHashSet containing all of the non-duplicate items in elements, in order
-     */
-    public static <T> LinkedHashSet<T> makeLHS(T... elements) {
-        if(elements == null) return null;
-        LinkedHashSet<T> set = new LinkedHashSet<>(elements.length);
-        Collections.addAll(set, elements);
-        return set;
-    }
-
-    /**
-     * Makes an OrderedMap (OM) with key and value types inferred from the types of k0 and v0, and considers all
-     * parameters key-value pairs, casting the Objects at positions 0, 2, 4... etc. to K and the objects at positions
-     * 1, 3, 5... etc. to V. If rest has an odd-number length, then it discards the last item. If any pair of items in
-     * rest cannot be cast to the correct type of K or V, then this inserts nothing for that pair and logs information
-     * on the problematic pair to the static Maker.issueLog field.
-     * @param k0 the first key; used to infer the types of other keys if generic parameters aren't specified.
-     * @param v0 the first value; used to infer the types of other values if generic parameters aren't specified.
-     * @param rest an array or vararg of keys and values in pairs; should contain alternating K, V, K, V... elements
-     * @param <K> the type of keys in the returned LinkedHashMap; if not specified, will be inferred from k0
-     * @param <V> the type of values in the returned LinkedHashMap; if not specified, will be inferred from v0
-     * @return a freshly-made OrderedMap with K keys and V values, using k0, v0, and the contents of rest to fill it
-     */
-    @SuppressWarnings("unchecked")
-    public static <K, V> OrderedMap<K, V> makeOM(K k0, V v0, Object... rest)
-    {
-        if(rest == null)
-            return makeOM(k0, v0);
-        OrderedMap<K, V> om = new OrderedMap<>(1 + (rest.length / 2));
-        om.put(k0, v0);
-
-        for (int i = 0; i < rest.length - 1; i+=2) {
-            try {
-                om.put((K) rest[i], (V) rest[i + 1]);
-            }catch (ClassCastException cce) {
-                issueLog.append("makeOM call had a casting problem with pair at rest[");
-                issueLog.append(i);
-                issueLog.append("] and/or rest[");
-                issueLog.append(i + 1);
-                issueLog.append("], with contents: ");
-                issueLog.append(rest[i]);
-                issueLog.append(", ");
-                issueLog.append(rest[i+1]);
-                issueLog.append(".\n\nException messages:\n");
-                issueLog.append(cce);
-                String msg = cce.getMessage();
-                if (msg != null) {
-                    issueLog.append('\n');
-                    issueLog.append(msg);
-                }
-                issueLog.append('\n');
-            }
-        }
-        return om;
-    }
-
-    /**
-     * Makes an empty OrderedMap (OM); needs key and value types to be specified in order to work. For an empty
-     * OrderedMap with String keys and Coord values, you could use {@code Maker.<String, Coord>makeOM();}. Using
-     * the new keyword is probably just as easy in this case; this method is provided for completeness relative to
-     * makeOM() with 2 or more parameters.
-     * @param <K> the type of keys in the returned OrderedMap; cannot be inferred and must be specified
-     * @param <V> the type of values in the returned OrderedMap; cannot be inferred and must be specified
-     * @return an empty OrderedMap with the given key and value types.
-     */
-    public static <K, V> OrderedMap<K, V> makeOM()
-    {
-        return new OrderedMap<>();
-    }
-
-    /**
-     * Makes a OrderedSet (OS) of T given an array or vararg of T elements. Duplicate items in elements will have
-     * all but one item discarded, using the later item in elements.
-     * @param elements an array or vararg of T
-     * @param <T> just about any non-primitive type
-     * @return a newly-allocated OrderedSet containing all of the non-duplicate items in elements, in order
-     */
-    public static <T> OrderedSet<T> makeOS(T... elements) {
-        if(elements == null) return null;
-        return new OrderedSet<T>(elements);
-    }
-}

+ 0 - 305
squidlib-util/src/main/java/squidpony/StringKit.java

@@ -1,305 +0,0 @@
-package squidpony;
-
-import squidpony.squidmath.CrossHash;
-
-/**
- * Various utility functions for dealing with Strings, CharSequences, and char[]s; mostly converting numbers.
- * Created by Tommy Ettinger on 3/21/2016.
- */
-public class StringKit {
-
-    public static String join(CharSequence delimiter, CharSequence... elements)
-    {
-        if(elements == null || elements.length == 0) return "";
-        StringBuilder sb = new StringBuilder(64);
-        sb.append(elements[0]);
-        for (int i = 1; i < elements.length; i++) {
-            sb.append(delimiter).append(elements[i]);
-        }
-        return sb.toString();
-    }
-    public static String joinArrays(CharSequence delimiter, char[]... elements)
-    {
-        if(elements == null || elements.length == 0) return "";
-        StringBuilder sb = new StringBuilder(64);
-        sb.append(elements[0]);
-        for (int i = 1; i < elements.length; i++) {
-            sb.append(delimiter).append(elements[i]);
-        }
-        return sb.toString();
-    }
-
-
-    public static final String mask64 = "0000000000000000000000000000000000000000000000000000000000000000",
-            mask32 = "00000000000000000000000000000000",
-            mask16 = "0000000000000000",
-            mask8 = "00000000";
-
-    public static String hex(long number) {
-        String h = Long.toHexString(number);
-        return mask16.substring(0, 16 - h.length()) + h;
-    }
-
-    public static String hex(int number) {
-        String h = Integer.toHexString(number);
-        return mask8.substring(0, 8 - h.length()) + h;
-    }
-
-    public static String hex(short number) {
-        String h = Integer.toHexString(number & 0xffff);
-        return mask8.substring(4, 8 - h.length()) + h;
-    }
-
-    public static String hex(char number) {
-        String h = Integer.toHexString(number & 0xffff);
-        return mask8.substring(4, 8 - h.length()) + h;
-    }
-
-    public static String hex(byte number) {
-        String h = Integer.toHexString(number & 0xff);
-        return mask8.substring(6, 8 - h.length()) + h;
-    }
-
-    public static String hex(long[] numbers) {
-        int len;
-        if(numbers == null || (len = numbers.length) <= 0) return "";
-        StringBuilder sb = new StringBuilder(numbers.length << 4);
-        for (int i = 0; i < len; i++) {
-            sb.append(hex(numbers[i]));
-        }
-        return sb.toString();
-    }
-
-    public static String hex(int[] numbers) {
-        int len;
-        if(numbers == null || (len = numbers.length) <= 0) return "";
-        StringBuilder sb = new StringBuilder(numbers.length << 3);
-        for (int i = 0; i < len; i++) {
-            sb.append(hex(numbers[i]));
-        }
-        return sb.toString();
-    }
-    public static String hex(short[] numbers) {
-        int len;
-        if(numbers == null || (len = numbers.length) <= 0) return "";
-        StringBuilder sb = new StringBuilder(numbers.length << 2);
-        for (int i = 0; i < len; i++) {
-            sb.append(hex(numbers[i]));
-        }
-        return sb.toString();
-    }
-    public static String hex(char[] numbers) {
-        int len;
-        if(numbers == null || (len = numbers.length) <= 0) return "";
-        StringBuilder sb = new StringBuilder(numbers.length << 2);
-        for (int i = 0; i < len; i++) {
-            sb.append(hex(numbers[i]));
-        }
-        return sb.toString();
-    }
-    public static String hex(byte[] numbers) {
-        int len;
-        if(numbers == null || (len = numbers.length) <= 0) return "";
-        StringBuilder sb = new StringBuilder(numbers.length << 1);
-        for (int i = 0; i < len; i++) {
-            sb.append(hex(numbers[i]));
-        }
-        return sb.toString();
-    }
-    public static String bin(long number) {
-        String h = Long.toBinaryString(number);
-        return mask64.substring(0, 64 - h.length()) + h;
-    }
-
-    public static String bin(int number) {
-        String h = Integer.toBinaryString(number);
-        return mask32.substring(0, 32 - h.length()) + h;
-    }
-
-    public static String bin(short number) {
-        String h = Integer.toHexString(number & 0xffff);
-        return mask16.substring(0, 16 - h.length()) + h;
-    }
-
-    public static String bin(char number) {
-        String h = Integer.toHexString(number & 0xffff);
-        return mask16.substring(0, 16 - h.length()) + h;
-    }
-
-    public static String bin(byte number) {
-        String h = Integer.toHexString(number & 0xff);
-        return mask8.substring(0, 8 - h.length()) + h;
-    }
-    public static char[] apEncode(long number, int offset, char[] buf) {
-        if(buf != null && buf.length >= 16 - offset) {
-            buf[offset] = (char) ((number >>> 60) + 65);
-            buf[offset+1] = (char) ((0xf & (number >>> 56)) + 65);
-            buf[offset+2] = (char) ((0xf & (number >>> 52)) + 65);
-            buf[offset+3] = (char) ((0xf & (number >>> 48)) + 65);
-            buf[offset+4] = (char) ((0xf & (number >>> 44)) + 65);
-            buf[offset+5] = (char) ((0xf & (number >>> 40)) + 65);
-            buf[offset+6] = (char) ((0xf & (number >>> 36)) + 65);
-            buf[offset+7] = (char) ((0xf & (number >>> 32)) + 65);
-            buf[offset+8] = (char) ((0xf & (number >>> 28)) + 65);
-            buf[offset+9] = (char) ((0xf & (number >>> 24)) + 65);
-            buf[offset+10] = (char) ((0xf & (number >>> 20)) + 65);
-            buf[offset+11] = (char) ((0xf & (number >>> 16)) + 65);
-            buf[offset+12] = (char) ((0xf & (number >>> 12)) + 65);
-            buf[offset+13] = (char) ((0xf & (number >>> 8)) + 65);
-            buf[offset+14] = (char) ((0xf & (number >>> 4)) + 65);
-            buf[offset+15] = (char) ((0xf & number) + 65);
-        }
-        return buf;
-    }
-
-    public static char[] apEncode(double number, int offset, char[] buf) {
-        return apEncode(Double.doubleToLongBits(number), offset, buf);
-    }
-        public static char[] apEncode(int number, int offset, char[] buf) {
-        if(buf != null && buf.length >= 8 - offset) {
-            buf[offset] = (char)((number >>> 28) + 65);
-            buf[offset+1] = (char)((0xf & (number >>> 24)) + 65);
-            buf[offset+2] = (char)((0xf & (number >>> 20)) + 65);
-            buf[offset+3] = (char)((0xf & (number >>> 16)) + 65);
-            buf[offset+4] = (char)((0xf & (number >>> 12)) + 65);
-            buf[offset+5] = (char)((0xf & (number >>> 8)) + 65);
-            buf[offset+6] = (char)((0xf & (number >>> 4)) + 65);
-            buf[offset+7] = (char)((0xf & number) + 65);
-        }
-        return buf;
-    }
-    public static char[] apEncode(float number, int offset, char[] buf) {
-        return apEncode(Float.floatToIntBits(number), offset, buf);
-    }
-    public static char[] apEncode(short number, int offset, char[] buf) {
-        if(buf != null && buf.length >= 4 - offset) {
-            buf[offset] = (char)((number >>> 12) + 65);
-            buf[offset+1] = (char)((0xf & (number >>> 8)) + 65);
-            buf[offset+2] = (char)((0xf & (number >>> 4)) + 65);
-            buf[offset+3] = (char)((0xf & number) + 65);
-        }
-        return buf;
-    }
-
-    public static char[] apEncode(char number, int offset, char[] buf) {
-        if(buf != null && buf.length >= 4 - offset) {
-            buf[offset] = (char)((number >>> 12) + 65);
-            buf[offset+1] = (char)((0xf & (number >>> 8)) + 65);
-            buf[offset+2] = (char)((0xf & (number >>> 4)) + 65);
-            buf[offset+3] = (char)((0xf & number) + 65);
-        }
-        return buf;
-    }
-
-    public static char[] apEncode(byte number, int offset, char[] buf) {
-        if(buf != null && buf.length >= 2 - offset) {
-            buf[offset] = (char)((number >>> 4) + 65);
-            buf[offset+1] = (char)((0xf & number) + 65);
-        }
-        return buf;
-
-    }
-
-    public static long apDecodeLong(char[] data, int offset)
-    {
-        return (data == null || data.length < 16 + offset) ? 0 :
-                ((0xf & data[offset] - 65L) << 60)
-                        | ((0xf & data[offset + 1] - 65L) << 56)
-                        | ((0xf & data[offset + 2] - 65L) << 52)
-                        | ((0xf & data[offset + 3] - 65L) << 48)
-                        | ((0xf & data[offset + 4] - 65L) << 44)
-                        | ((0xf & data[offset + 5] - 65L) << 40)
-                        | ((0xf & data[offset + 6] - 65L) << 36)
-                        | ((0xf & data[offset + 7] - 65L) << 32)
-                        | ((0xf & data[offset + 8] - 65L) << 28)
-                        | ((0xf & data[offset + 9] - 65L) << 24)
-                        | ((0xf & data[offset + 10] - 65L) << 20)
-                        | ((0xf & data[offset + 11] - 65L) << 16)
-                        | ((0xf & data[offset + 12] - 65L) << 12)
-                        | ((0xf & data[offset + 13] - 65L) << 8)
-                        | ((0xf & data[offset + 14] - 65L) << 4)
-                        | (0xf & data[offset + 15] - 65L);
-    }
-    public static double apDecodeDouble(char[] data, int offset)
-    {
-        return (data == null || data.length < 16 + offset) ? 0.0 :
-                Double.longBitsToDouble(((0xf & data[offset] - 65L) << 60)
-                        | ((0xf & data[offset + 1] - 65L) << 56)
-                        | ((0xf & data[offset + 2] - 65L) << 52)
-                        | ((0xf & data[offset + 3] - 65L) << 48)
-                        | ((0xf & data[offset + 4] - 65L) << 44)
-                        | ((0xf & data[offset + 5] - 65L) << 40)
-                        | ((0xf & data[offset + 6] - 65L) << 36)
-                        | ((0xf & data[offset + 7] - 65L) << 32)
-                        | ((0xf & data[offset + 8] - 65L) << 28)
-                        | ((0xf & data[offset + 9] - 65L) << 24)
-                        | ((0xf & data[offset + 10] - 65L) << 20)
-                        | ((0xf & data[offset + 11] - 65L) << 16)
-                        | ((0xf & data[offset + 12] - 65L) << 12)
-                        | ((0xf & data[offset + 13] - 65L) << 8)
-                        | ((0xf & data[offset + 14] - 65L) << 4)
-                        | (0xf & data[offset + 15] - 65L));
-    }
-    public static int apDecodeInt(char[] data, int offset)
-    {
-        return (data == null || data.length < 8 + offset) ? 0 :
-                ((0xf & data[offset] - 65) << 28)
-                        | ((0xf & data[offset + 1] - 65) << 24)
-                        | ((0xf & data[offset + 2] - 65) << 20)
-                        | ((0xf & data[offset + 3] - 65) << 16)
-                        | ((0xf & data[offset + 4] - 65) << 12)
-                        | ((0xf & data[offset + 5] - 65) << 8)
-                        | ((0xf & data[offset + 6] - 65) << 4)
-                        | (0xf & data[offset + 7] - 65);
-    }
-    public static float apDecodeFloat(char[] data, int offset)
-    {
-        return (data == null || data.length < 8 + offset) ? 0f :
-                Float.intBitsToFloat(((0xf & data[offset] - 65) << 28)
-                        | ((0xf & data[offset + 1] - 65) << 24)
-                        | ((0xf & data[offset + 2] - 65) << 20)
-                        | ((0xf & data[offset + 3] - 65) << 16)
-                        | ((0xf & data[offset + 4] - 65) << 12)
-                        | ((0xf & data[offset + 5] - 65) << 8)
-                        | ((0xf & data[offset + 6] - 65) << 4)
-                        | (0xf & data[offset + 7] - 65));
-    }
-    public static short apDecodeShort(char[] data, int offset)
-    {
-        return (short) ((data == null || data.length < 4 + offset) ? 0 :
-                ((0xf & data[offset] - 65) << 12)
-                        | ((0xf & data[offset + 1] - 65) << 8)
-                        | ((0xf & data[offset + 2] - 65) << 4)
-                        | (0xf & data[offset + 3] - 65));
-    }
-    public static byte apDecodeByte(char[] data, int offset)
-    {
-        return (byte) ((data == null || data.length < 2 + offset) ? 0 :
-                ((0xf & data[offset] - 65) << 4)
-                        | (0xf & data[offset + 1] - 65));
-    }
-
-    public static String hexHash(boolean... array) {
-        return hex(CrossHash.hash64(array));
-    }
-
-    public static String hexHash(byte... array) {
-        return hex(CrossHash.hash64(array));
-    }
-
-    public static String hexHash(short... array) {
-        return hex(CrossHash.hash64(array));
-    }
-
-    public static String hexHash(char... array) {
-        return hex(CrossHash.hash64(array));
-    }
-
-    public static String hexHash(int... array) {
-        return hex(CrossHash.hash64(array));
-    }
-
-    public static String hexHash(long... array) {
-        return hex(CrossHash.hash64(array));
-    }
-}

+ 0 - 27
squidlib-util/src/main/java/squidpony/annotation/Beta.java

@@ -1,27 +0,0 @@
-package squidpony.annotation;
-
-import java.lang.annotation.Documented;
-import java.lang.annotation.ElementType;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.lang.annotation.Target;
-
-/**
- * Signifies that a public API (public class, method or field) is subject to
- * incompatible changes, or even removal, in a future release. An API bearing
- * this annotation is exempt from any compatibility guarantees made by its
- * containing library.
- *
- * @author Kevin Bourrillion
- */
-@Retention(RetentionPolicy.CLASS)
-@Target({
-    ElementType.ANNOTATION_TYPE,
-    ElementType.CONSTRUCTOR,
-    ElementType.FIELD,
-    ElementType.METHOD,
-    ElementType.TYPE})
-@Documented
-@Beta
-public @interface Beta {
-}

+ 0 - 4
squidlib-util/src/main/java/squidpony/annotation/package-info.java

@@ -1,4 +0,0 @@
-/**
- * Annotations used elsewhere in SquidLib.
- */
-package squidpony.annotation;

+ 0 - 81
squidlib-util/src/main/java/squidpony/squidgrid/LOS.java

@@ -2,15 +2,12 @@ package squidpony.squidgrid;
 
 import java.util.ArrayList;
 import java.util.Arrays;
-import java.util.HashMap;
 import java.util.LinkedList;
 import java.util.List;
 
-import squidpony.annotation.GwtIncompatible;
 import squidpony.squidmath.Bresenham;
 import squidpony.squidmath.Coord;
 import squidpony.squidmath.DDALine;
-import squidpony.squidmath.Elias;
 import squidpony.squidmath.OrderedSet;
 
 /**
@@ -42,15 +39,6 @@ public class LOS {
 	 * A Bresenham-based line-of-sight algorithm.
 	 */
 	public static final int BRESENHAM = 1;
-	/**
-	 * Uses Wu's Algorithm as modified by Elias to draw the line. Does not end at an
-	 * obstruction but rather returns one of the possible attempted paths in full.
-	 *
-	 * <p>
-	 * Be aware, it is GWT-incompatible.
-	 * </p>
-	 */
-	public static final int ELIAS = 2;
 	/**
 	 * Uses a series of rays internal to the start and end point to determine
 	 * visibility. Appearance is extremely close to DDA, which is also probably a
@@ -79,7 +67,6 @@ public class LOS {
 	private int type;
 	private double[][] resistanceMap;
 	private int startx, starty, targetx, targety;
-	private Elias elias = null;
 
 	/**
 	 * Gets the radius strategy this uses.
@@ -122,8 +109,6 @@ public class LOS {
 	 */
 	public LOS(int type) {
 		this.type = type;
-		if (type == ELIAS)
-			elias = new Elias();
 	}
 
 	/**
@@ -215,10 +200,6 @@ public class LOS {
 		switch (type) {
 		case BRESENHAM:
 			return bresenhamReachable(radiusStrategy);
-		case ELIAS:
-			throw new IllegalStateException("Elias LOS is Gwt Incompatible");
-			// Comment required to compile with GWT:
-			// return eliasReachable(radiusStrategy);
 		case RAY:
 			return rayReachable(radiusStrategy);
 		case DDA:
@@ -585,66 +566,4 @@ public class LOS {
 		return end.x == targetx && end.y == targety;
 	}
 
-	@GwtIncompatible /* Because of Thread */
-	private boolean eliasReachable(Radius radiusStrategy) {
-		if (elias == null)
-			elias = new Elias();
-		List<Coord> ePath = elias.line(startx, starty, targetx, targety);
-		lastPath = new LinkedList<>(ePath);// save path for later retreival
-
-		HashMap<EliasWorker, Thread> pool = new HashMap<>();
-
-		for (Coord p : ePath) {
-			EliasWorker worker = new EliasWorker(p.x, p.y, radiusStrategy);
-			Thread thread = new Thread(worker);
-			thread.start();
-			pool.put(worker, thread);
-		}
-
-		for (EliasWorker w : pool.keySet()) {
-			try {
-				pool.get(w).join();
-			} catch (InterruptedException ex) {
-			}
-			if (w.succeeded) {
-				lastPath = w.path;
-				return true;
-			}
-		}
-
-		return false;// never got to the target point
-	}
-
-	private class EliasWorker implements Runnable {
-
-		private LinkedList<Coord> path;
-		private boolean succeeded = false;
-		private int testx, testy;
-		private Radius eliasRadiusStrategy;
-
-		EliasWorker(int testx, int testy, Radius radiusStrategy) {
-			this.testx = testx;
-			this.testy = testy;
-			this.eliasRadiusStrategy = radiusStrategy;
-		}
-
-		@Override
-		public void run() {
-			LOS los1 = new LOS(BRESENHAM);
-			LOS los2 = new LOS(BRESENHAM);
-			// if a non-solid midpoint on the path can see both the start and end, consider
-			// the two ends to be able to see each other
-			if (resistanceMap[testx][testy] < 1
-					&& eliasRadiusStrategy.radius(startx, starty, testx, testy) <= eliasRadiusStrategy.radius(startx,
-							starty, targetx, targety)
-					&& los1.isReachable(resistanceMap, testx, testy, targetx, targety, eliasRadiusStrategy)
-					&& los2.isReachable(resistanceMap, startx, starty, testx, testy, eliasRadiusStrategy)) {
-
-				// record actual sight path used
-				path = new LinkedList<>(los2.lastPath);
-				path.addAll(los1.lastPath);
-				succeeded = true;
-			}
-		}
-	}
 }

+ 0 - 4
squidlib-util/src/main/java/squidpony/squidmath/CrossHash.java

@@ -1,7 +1,5 @@
 package squidpony.squidmath;
 
-import squidpony.annotation.Beta;
-
 import java.io.Serializable;
 
 /**
@@ -1481,7 +1479,6 @@ public class CrossHash {
             return (int) ((result ^= Long.rotateLeft((z * 0xC6BC279692B5CC83L ^ $alt ^ result * 0x9E3779B97F4A7C15L) + 0x632BE59BD9B4E019L, (int) (chips + z >>> 58))) ^ (result >>> 32));
         }
     }
-    @Beta
     public static class Falcon
     {
         public static long hash64(final boolean[] data) {
@@ -1769,7 +1766,6 @@ public class CrossHash {
             return result ^ ((z ^ result) >>> 8) * 0x9E3779B9;
         }
     }
-    @Beta
     public static class Wisp
     {
         public static long hash64(final boolean[] data) {

+ 0 - 215
squidlib-util/src/main/java/squidpony/squidmath/Elias.java

@@ -1,215 +0,0 @@
-package squidpony.squidmath;
-
-
-import squidpony.annotation.Beta;
-
-import java.io.Serializable;
-import java.util.LinkedList;
-import java.util.List;
-
-/**
- * Contains methods to draw antialiased lines based on floating point
- * coordinates.
- *
- * Because of the way this line is calculated, endpoints may be swapped and
- * therefore the list may not be in start-to-end order.
- *
- * Based on work by Hugo Elias at
- * http://freespace.virgin.net/hugo.elias/graphics/x_wuline.htm which is in turn
- * base on work by Wu.
- *
- * @author Eben Howard - http://squidpony.com - howard@squidpony.com
- */
-@Beta
-public class Elias implements Serializable {
-
-    private static final long serialVersionUID = 5290834334572814012L;
-
-    private List<Coord> path;
-    private float[][] lightMap;
-    private int width, height;
-    private double threshold = 0.0;
-
-    public Elias() {
-    }
-
-    public synchronized float[][] lightMap(double startx, double starty, double endx, double endy) {
-        line(startx, starty, endx, endy);
-        return lightMap;
-    }
-
-    /**
-     * Gets the line between the two points.
-     *
-     * @param startx
-     * @param starty
-     * @param endx
-     * @param endy
-     * @return
-     */
-    public synchronized List<Coord> line(double startx, double starty, double endx, double endy) {
-        path = new LinkedList<>();
-        width = (int) (Math.max(startx, endx) + 1);
-        height = (int) (Math.max(starty, endy) + 1);
-        lightMap = new float[width][height];
-        runLine(startx, starty, endx, endy);
-        return path;
-    }
-    /**
-     * Gets the line between the two points.
-     *
-     * @param startx
-     * @param starty
-     * @param endx
-     * @param endy
-     * @param brightnessThreshold between 0.0 (default) and 1.0; only Points with higher brightness will be included
-     * @return
-     */
-    public synchronized List<Coord> line(double startx, double starty, double endx, double endy,
-                                                double brightnessThreshold) {
-        threshold = brightnessThreshold;
-        path = new LinkedList<>();
-        width = (int) (Math.max(startx, endx) + 1);
-        height = (int) (Math.max(starty, endy) + 1);
-        lightMap = new float[width][height];
-        runLine(startx, starty, endx, endy);
-        return path;
-    }
-    public synchronized List<Coord> line(Coord start, Coord end) {
-        return line(start.x, start.y, end.x, end.y);
-    }
-    public synchronized List<Coord> line(Coord start, Coord end, double brightnessThreshold) {
-        return line(start.x, start.y, end.x, end.y, brightnessThreshold);
-    }
-
-    public synchronized List<Coord> getLastPath()
-    {
-        return path;
-    }
-
-    /**
-     * Marks the location as having the visibility given.
-     *
-     * @param x
-     * @param y
-     * @param c
-     */
-    private void mark(double x, double y, double c) {
-        //check bounds overflow from antialiasing
-        if (x >= 0 && x < width && y >= 0 && y < height && c > threshold) {
-            path.add(Coord.get((int) x, (int) y));
-            lightMap[(int) x][(int) y] = (float) c;
-        }
-    }
-
-    private double trunc(double x) {
-        if (x < 0) {
-            return Math.ceil(x);
-        } else {
-            return Math.floor(x);
-        }
-    }
-
-    private double frac(double x) {
-        return x - trunc(x);
-    }
-
-    private double invfrac(double x) {
-        return 1 - frac(x);
-    }
-
-    private void runLine(double startx, double starty, double endx, double endy) {
-        double x1 = startx, y1 = starty, x2 = endx, y2 = endy;
-        double grad, xd, yd, xgap, xend, yend, yf, brightness1, brightness2;
-        int x, ix1, ix2, iy1, iy2;
-        boolean shallow = false;
-
-        xd = x2 - x1;
-        yd = y2 - y1;
-
-        if (Math.abs(xd) > Math.abs(yd)) {
-            shallow = true;
-        }
-
-        if (!shallow) {
-            double temp = x1;
-            x1 = y1;
-            y1 = temp;
-            temp = x2;
-            x2 = y2;
-            y2 = temp;
-            xd = x2 - x1;
-            yd = y2 - y1;
-        }
-        if (x1 > x2) {
-            double temp = x1;
-            x1 = x2;
-            x2 = temp;
-            temp = y1;
-            y1 = y2;
-            y2 = temp;
-            xd = x2 - x1;
-            yd = y2 - y1;
-        }
-
-        grad = yd / xd;
-
-        //add the first end point
-        xend = trunc(x1 + .5);
-        yend = y1 + grad * (xend - x1);
-
-        xgap = invfrac(x1 + .5);
-
-        ix1 = (int) xend;
-        iy1 = (int) yend;
-
-        brightness1 = invfrac(yend) * xgap;
-        brightness2 = frac(yend) * xgap;
-
-        if (shallow) {
-            mark(ix1, iy1, brightness1);
-            mark(ix1, iy1 + 1, brightness2);
-        } else {
-            mark(iy1, ix1, brightness1);
-            mark(iy1 + 1, ix1, brightness2);
-        }
-
-        yf = yend + grad;
-
-        //add the second end point
-        xend = trunc(x2 + .5);
-        yend = y2 + grad * (xend - x2);
-
-        xgap = invfrac(x2 - .5);
-
-        ix2 = (int) xend;
-        iy2 = (int) yend;
-
-        brightness1 = invfrac(yend) * xgap;
-        brightness2 = frac(yend) * xgap;
-
-        if (shallow) {
-            mark(ix2, iy2, brightness1);
-            mark(ix2, iy2 + 1, brightness2);
-        } else {
-            mark(iy2, ix2, brightness1);
-            mark(iy2 + 1, ix2, brightness2);
-        }
-
-        //add the in-between points
-        for (x = ix1 + 1; x < ix2; x++) {
-            brightness1 = invfrac(yf);
-            brightness2 = frac(yf);
-
-            if (shallow) {
-                mark(x, (int) yf, brightness1);
-                mark(x, (int) yf + 1, brightness2);
-            } else {
-                mark((int) yf, x, brightness1);
-                mark((int) yf + 1, x, brightness2);
-            }
-
-            yf += grad;
-        }
-    }
-}

+ 0 - 2
squidlib-util/src/main/java/squidpony/squidmath/GreasedRegion.java

@@ -5,7 +5,6 @@ import java.util.ArrayList;
 import java.util.Arrays;
 
 import squidpony.GwtCompatibility;
-import squidpony.annotation.Beta;
 import squidpony.squidgrid.Radius;
 
 /**
@@ -13,7 +12,6 @@ import squidpony.squidgrid.Radius;
  * (fatty), but fast (greased lightning). Created by Tommy Ettinger on
  * 6/24/2016.
  */
-@Beta
 public class GreasedRegion implements Serializable {
 	private static final long serialVersionUID = 0;
 	private static final SobolQRNG sobol = new SobolQRNG(2);

+ 7 - 0
squidlib-util/src/main/java/squidpony/squidmath/IRNG.java

@@ -1,5 +1,6 @@
 package squidpony.squidmath;
 
+import java.io.Serializable;
 import java.util.ArrayList;
 import java.util.Collection;
 import java.util.List;
@@ -226,4 +227,10 @@ public interface IRNG {
 	 */
 	public <T> ArrayList<T> shuffle(Collection<T> elements, /* @Nullable */ ArrayList<T> buf);
 
+	/**
+	 * The state of {@code this}. May be {@code this} itself, maybe not.
+	 * 
+	 * @param acc
+	 */
+	public Serializable toSerializable();
 }

+ 0 - 8
squidlib-util/src/main/java/squidpony/squidmath/LightRNG.java

@@ -8,8 +8,6 @@ worldwide. This software is distributed without any warranty.
 See <http://creativecommons.org/publicdomain/zero/1.0/>. */
 package squidpony.squidmath;
 
-import squidpony.StringKit;
-
 /**
  * This is a SplittableRandom-style generator, meant to have a tiny state
  * that permits storing many different generators with low overhead.
@@ -234,12 +232,6 @@ public class LightRNG implements RandomnessSource, StatefulRandomness
         return state += 0x9E3779B97F4A7C15L * advance;
     }
 
-
-    @Override
-    public String toString() {
-        return "LightRNG with state 0x" + StringKit.hex(state) + 'L';
-    }
-
     @Override
     public boolean equals(Object o) {
         if (this == o) return true;

+ 15 - 5
squidlib-util/src/main/java/squidpony/squidmath/OrderedMap.java

@@ -15,11 +15,22 @@
  */
 package squidpony.squidmath;
 
-import squidpony.annotation.Beta;
-import squidpony.annotation.GwtIncompatible;
-
 import java.io.Serializable;
-import java.util.*;
+import java.util.AbstractCollection;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.Comparator;
+import java.util.Iterator;
+import java.util.List;
+import java.util.ListIterator;
+import java.util.Map;
+import java.util.NoSuchElementException;
+import java.util.Set;
+import java.util.SortedMap;
+import java.util.SortedSet;
+
+import squidpony.annotation.GwtIncompatible;
 
 /**
  * A generic linked hash map with with a fast implementation, originally from fastutil as Object2ObjectLinkedOpenHashMap but modified to support indexed access.
@@ -52,7 +63,6 @@ import java.util.*;
  * @author Sebastiano Vigna (responsible for all the hard parts)
  * @author Tommy Ettinger (mostly responsible for squashing several layers of parent classes into one monster class)
  */
-@Beta
 public class OrderedMap<K, V> implements SortedMap<K, V>, java.io.Serializable, Cloneable {
     private static final long serialVersionUID = 0L;
     /**

+ 2 - 4
squidlib-util/src/main/java/squidpony/squidmath/OrderedSet.java

@@ -15,9 +15,6 @@
  */
 package squidpony.squidmath;
 
-import squidpony.annotation.Beta;
-import squidpony.annotation.GwtIncompatible;
-
 import java.util.Arrays;
 import java.util.Collection;
 import java.util.Comparator;
@@ -27,6 +24,8 @@ import java.util.NoSuchElementException;
 import java.util.Set;
 import java.util.SortedSet;
 
+import squidpony.annotation.GwtIncompatible;
+
 /**
  * A generic linked hash set with with a fast implementation, originally from fastutil as ObjectLinkedOpenHashSet but modified to support indexed access.
  * <p>
@@ -79,7 +78,6 @@ import java.util.SortedSet;
  * @author Sebastiano Vigna (responsible for all the hard parts)
  * @author Tommy Ettinger (mostly responsible for squashing several layers of parent classes into one monster class)
  */
-@Beta
 public class OrderedSet<K> implements SortedSet<K>, java.io.Serializable, Cloneable {
     private static final long serialVersionUID = 0L;
     /**