Tree Shaking Report

ApprovalTests 31.0.0 · 9 entry points from approvaltests-selection.json · original vs. partial
Source files
143 / 448
305 deleted · 43 changed · 100 untouched
Lines of source
20%
5,849 of 29,097 kept
Compiled .class files
161 / 542
295 KB of 1,313 KB (22%)
Jar size
252 KB
vs. 948 KB for the original jars (27%)
Third-party packages
5 / 16
still imported

Inputs

Selection file
approvaltests-selection.json
path/to/ApprovalTests.java.StarterProject
ApprovalTests version
31.0.0
cloned from the 31.0.0 tag of approvals/ApprovalTests.Java
Entry points you selected (9)
Everything kept is reachable from these. Everything else is deleted.
CallKindPackage
approvaltests.Approvalsfieldorg
Approvals.verify(String)methodorg.approvaltests
approvaltests.JsonApprovalsfieldorg
JsonApprovals.verifyAsJson(Object)methodorg.approvaltests
core.ApprovalFailureReporterfieldorg.approvaltests
core.Optionsfieldorg.approvaltests
reporters.DiffReporterfieldorg.approvaltests
DiffReporter.INSTANCEfieldorg.approvaltests.reporters
reporters.UseReporterfieldorg.approvaltests
Runtime discoveries
DiscoveryMode
everythingkeep — works normally
Output
  • jar: approvaltests-31.0.0-custom.jar
  • directory: path/to/ApprovalTests.java.StarterProject/target/approvaltests-custom
Raw approvaltests-selection.json
{
  "approvaltestsVersion": "31.0.0",
  "entryPoints": [
    "org.approvaltests.Approvals",
    "org.approvaltests.Approvals.verify(java.lang.String)",
    "org.approvaltests.JsonApprovals",
    "org.approvaltests.JsonApprovals.verifyAsJson(java.lang.Object)",
    "org.approvaltests.core.ApprovalFailureReporter",
    "org.approvaltests.core.Options",
    "org.approvaltests.reporters.DiffReporter",
    "org.approvaltests.reporters.DiffReporter.INSTANCE",
    "org.approvaltests.reporters.UseReporter"
  ],
  "runtimeDiscoveries": {
    "*": "keep"
  },
  "output": {
    "directory": "target/approvaltests-custom",
    "version": "31.0.0-custom",
    "pom": true,
    "sources": true,
    "install": "none"
  }
}

By module

ModuleFilesKeptLines beforeLines afterKept
approvaltests-util2655420,6933,19115%
approvaltests183898,4042,65832%

By package

keptremovedstruck-through = whole package removed
PackageFilesDeletedChangedLines beforeLines afterKept
com.spun.swing4406800%
com.spun.util553997,22381311%
com.spun.util.database282712,590522%
com.spun.util.database.automaticsetter77026000%
com.spun.util.date22019700%
com.spun.util.filters88010900%
com.spun.util.images1108000%
com.spun.util.introspection2204500%
com.spun.util.io171421,64425215%
com.spun.util.io.filefilters3305200%
com.spun.util.io.xml1010049100%
com.spun.util.logger74272929741%
com.spun.util.markdown110600%
com.spun.util.markdown.table66027800%
com.spun.util.parser141041,37617213%
com.spun.util.persistence98014985%
com.spun.util.persistence.test3305500%
com.spun.util.quartz1102600%
com.spun.util.servlets22023900%
com.spun.util.sql3301,38600%
com.spun.util.tests71139320251%
com.spun.util.timers88067400%
com.spun.util.timers.test1102300%
com.spun.util.velocity83280848460%
org.approvaltests171131,18432828%
org.approvaltests.approvers30214212991%
org.approvaltests.awt44035300%
org.approvaltests.combinations44088900%
org.approvaltests.combinations.pairwise55054000%
org.approvaltests.core103126716361%
org.approvaltests.inline66059500%
org.approvaltests.integrations.junit5210772938%
org.approvaltests.internal.logs300113113100%
org.approvaltests.legacycode1103700%
org.approvaltests.namer157469532246%
org.approvaltests.reporters432441,42075453%
org.approvaltests.reporters.intellij1009393100%
org.approvaltests.reporters.linux82014610270%
org.approvaltests.reporters.macosx1400222222100%
org.approvaltests.reporters.windows1400222222100%
org.approvaltests.scrubbers760362134%
org.approvaltests.strings2208300%
org.approvaltests.testcommitrevert2202500%
org.approvaltests.utils33013200%
org.approvaltests.utils.logger2204000%
org.approvaltests.utils.parseinput44029900%
org.approvaltests.velocity1104500%
org.approvaltests.writers126042316840%
org.lambda10066100%
org.lambda.actions211812723011%
org.lambda.functions211702013618%
org.lambda.query85395464167%
org.lambda.utils4311692917%
org.packagesettings30319016989%

Third-party dependencies

Package (from imports)Status
com.fasterxmlremoved
com.googlestill referenced
com.sshtoolsremoved
com.thoughtworksremoved
jakarta.mailremoved
jakarta.servletremoved
nu.xomremoved
org.apachestill referenced
org.junitstill referenced
org.packagesettingsstill referenced
org.quartzremoved
org.slf4jstill referenced
org.testngremoved
org.w3cremoved
org.xmlremoved
tools.jacksonremoved

Changed files (43)

Sorted by lines removed. Expand for the diff against the original.
com/spun/util/StringUtils.java 712 → 52 lines (-660)
@@ -1,22 +1,4 @@
 package com.spun.util;
 
-import org.lambda.functions.Function1;
-import org.lambda.query.Query;
-import org.lambda.query.Queryable;
-
-import java.io.ByteArrayInputStream;
-import java.io.InputStream;
-import java.io.UnsupportedEncodingException;
-import java.lang.reflect.Field;
-import java.nio.charset.StandardCharsets;
-import java.util.Arrays;
-import java.util.Collection;
-import java.util.Comparator;
-import java.util.List;
-import java.util.Map;
-import java.util.Properties;
-import java.util.SortedMap;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
 
 /**
@@ -26,21 +8,4 @@ public class StringUtils
 {
   public static final String NEW_LINE = System.getProperty("line.separator");
-  public static String toURLEncode(String input)
-  {
-    try
-    {
-      return input == null ? null : java.net.URLEncoder.encode(input, "UTF-8");
-    }
-    catch (UnsupportedEncodingException e)
-    {
-      throw ObjectUtils.throwAsError(e);
-    }
-  }
-
-  public static String loadNullableString(String i)
-  {
-    return StringUtils.isNonZero(i) ? i.trim() : null;
-  }
-
   /**
    * Decode a URLEncoded <code>input</code> String.
@@ -52,273 +17,5 @@ public class StringUtils
    * @see java.net.URLDecoder
    */
-  public static String URLDecode(String input)
-  {
-    try
-    {
-      return input == null ? null : java.net.URLDecoder.decode(input, "UTF-8");
-    }
-    catch (Exception e)
-    {
-      return null;
-    }
-  }
-
-  public static String[] split(String string, String splitOn)
-  {
-    return split(string, splitOn, false);
-  }
-
-  public static String[] split(String string, String splitOn, boolean trim)
-  {
-    String[] result;
-    if (string.endsWith(splitOn))
-    {
-      String ending = "ś".equals(splitOn) ? "š" : "ś";
-      string = string + ending;
-      String[] splitted = string.split(splitOn, -1);
-      result = ArrayUtils.getSubsection(splitted, 0, splitted.length - 1);
-    }
-    else
-    {
-      result = string.split(splitOn);
-    }
-    return trim ? Query.select(result, a -> a.trim()).asArray() : result;
-  }
-
-  public static String replace(String string, String find, String replace)
-  {
-    if ((string == null) || (find == null) || (replace == null))
-    { throw new NullPointerException(String.format("[string,find,replace] = [%s,%s,%s]", string, find, replace)); }
-    String[] parts = split(string, find, false);
-    if (parts.length == 1)
-    { return string; }
-    String result = "";
-    for (int i = 0; i < parts.length; i++)
-    {
-      result += parts[i] + replace;
-    }
-    return result.substring(0, result.length() - replace.length());
-  }
 
-  public static String stripWhiteSpace(String text)
-  {
-    return stripWhiteSpace(text, false);
-  }
-
-  public static String padNumber(long number, int digits)
-  {
-    String text = "" + number;
-    while (text.length() < digits)
-    {
-      text = "0" + text;
-    }
-    return text;
-  }
-
-  public static String padNumber(int number, int digits)
-  {
-    return padNumber((long) number, digits);
-  }
-
-  public static String stripWhiteSpace(String text, boolean all)
-  {
-    StringBuffer newText = new StringBuffer();
-    boolean whitespace = false;
-    int num = text.length();
-    char whiteSpaceChar = ' ';
-    boolean atStart = true;
-    for (int i = 0; i < num; i++)
-    {
-      char c = text.charAt(i);
-      switch (c)
-      {
-        case '\r' :
-        case '\n' :
-          whiteSpaceChar = '\n';
-          whitespace = true;
-          break;
-        case '\t' :
-        case ' ' :
-          whitespace = true;
-          break;
-        default :
-          if (whitespace && atStart)
-          {
-            whitespace = false;
-          }
-          if (whitespace)
-          {
-            whitespace = false;
-            newText.append(all ? '_' : whiteSpaceChar);
-            whiteSpaceChar = ' ';
-          }
-          atStart = false;
-          newText.append(c);
-          break;
-      }
-    }
-    return newText.toString();
-  }
-
-  /**
-   * Turns "mr. frank m Peter" into "Mr. Frank M Peter"
-   **/
-  public static String toNameUpperCase(String name)
-  {
-    if (name == null)
-    { return null; }
-    StringBuffer returning = new StringBuffer(name.length());
-    String upper = name.toUpperCase();
-    int place = 0;
-    while (place < name.length())
-    {
-      char letter = name.charAt(place);
-      if (letter == ' ')
-      {
-        returning.append(' ');
-        if ((place + 1) < name.length())
-        {
-          returning.append(upper.charAt(++place));
-        }
-      }
-      else if ((place == 0))
-      {
-        returning.append(upper.charAt(0));
-      }
-      else
-      {
-        returning.append(letter);
-      }
-      place++;
-    }
-    return returning.toString();
-  }
-
-  public static String toConvertCamelCaseString(String varName, String insertBeforeCaps)
-  {
-    StringBuffer staticVarName = new StringBuffer();
-    for (int i = 0; i < varName.length(); i++)
-    {
-      char letter = varName.charAt(i);
-      if ((i > 0) && (letter == Character.toUpperCase(letter)) && Character.isLetter(letter))
-      {
-        staticVarName.append(insertBeforeCaps);
-      }
-      staticVarName.append(letter);
-    }
-    return staticVarName.toString();
-  }
-
-  /**
-   * Turns "ATTRIUBE_NAME" into "AttributeName"
-   **/
-  public static String toMethodNameCase(String name)
-  {
-    StringBuffer returning = new StringBuffer(name.length());
-    String upper = name.toUpperCase();
-    String lower = name.toLowerCase();
-    int place = 0;
-    while (place < name.length())
-    {
-      char letter = lower.charAt(place);
-      if (letter == ' ' || letter == '_')
-      {
-        if ((place + 1) < name.length())
-        {
-          returning.append(upper.charAt(++place));
-        }
-      }
-      else if ((place == 0))
-      {
-        returning.append(upper.charAt(0));
-      }
-      else
-      {
-        returning.append(letter);
-      }
-      place++;
-    }
-    return returning.toString();
-  }
-
-  public static String stripNonNumeric(String number)
-  {
-    return stripNonNumeric(number, false, false);
-  }
-
-  public static String stripCharacters(String dirtyString, String toStrip)
-  {
-    StringBuffer cleanStringBuffer = new StringBuffer();
-    for (int i = 0; i < dirtyString.length(); i++)
-    {
-      char currentChar = dirtyString.charAt(i);
-      if (toStrip.indexOf(currentChar) == -1)
-      {
-        cleanStringBuffer.append(currentChar);
-      }
-    }
-    return cleanStringBuffer.toString();
-  }
-
-  public static String escapeForXml(String string)
-  {
-    return string.replaceAll("&", "&amp;");
-  }
-
-  public static String stripNonNumeric(String number, boolean allowDecimal, boolean allowNegative)
-  {
-    boolean allowExponential = allowDecimal;
-    boolean afterE = false;
-    if (number == null)
-    { return ""; }
-    StringBuffer result = new StringBuffer();
-    for (int i = 0; i < number.length(); i++)
-    {
-      char c = number.charAt(i);
-      switch (c)
-      {
-        case '0' :
-        case '1' :
-        case '2' :
-        case '3' :
-        case '4' :
-        case '5' :
-        case '6' :
-        case '7' :
-        case '8' :
-        case '9' :
-          result.append(c);
-          afterE = false;
-          break;
-        case '-' :
-          if (allowNegative || afterE)
-          {
-            result.append(c);
-            allowNegative = false;
-          }
-          break;
-        case '.' :
-          if (allowDecimal)
-          {
-            result.append(c);
-            allowDecimal = false;
-          }
-          afterE = false;
-          break;
-        case 'e' :
-        case 'E' :
-          if (allowExponential)
-          {
-            result.append(c);
-            allowExponential = false;
-          }
-          afterE = true;
-          break;
-        default :
-          break;
-      }
-    }
-    return result.toString();
-  }
 
   /**
@@ -339,362 +36,5 @@ public class StringUtils
   }
 
-  /**
-   * A convenience function to turn a vector of String objects into an Array
-   * of the String objects.
-   *
-   * @param vectorOf
-   *            a Vector of String objects
-   * @return the array of String.
-   * @throws Error
-   *             if an element of vectorOf is not a String object.
-   **/
-  public static String[] toArray(java.util.Collection<String> vectorOf)
-  {
-    if (vectorOf == null)
-    { return new String[0]; }
-    String[] array = new String[vectorOf.size()];
-    java.util.Iterator<String> iterator = vectorOf.iterator();
-    int i = 0;
-    while (iterator.hasNext())
-    {
-      java.lang.Object rowObject = iterator.next();
-      if (rowObject instanceof String)
-      {
-        array[i++] = (String) rowObject;
-      }
-      else
-      {
-        throw new Error(
-            "toArray[" + i + "] is not an instance of String but a " + ObjectUtils.getClassName(rowObject));
-      }
-    }
-    return array;
-  }
-
-  public static int resolveEnumeration(String value, String[] enumeration)
-  {
-    return resolveEnumeration(value, enumeration, false);
-  }
-
-  public static int resolveEnumeration(String value, String[] enumeration, boolean force)
-  {
-    for (int i = 0; i < enumeration.length; i++)
-    {
-      if (enumeration[i].equals(value))
-      { return i; }
-    }
-    if (force)
-    { throw new Error("Enumeration '" + value + "' not in " + Arrays.asList(enumeration).toString()); }
-    return -1;
-  }
-
-  public static String truncate(String string, int maxLength)
-  {
-    if (string == null)
-    { return null; }
-    return (string.length() <= maxLength) ? string : string.substring(0, maxLength);
-  }
-
-  public static boolean hasNumeric(String teamId)
-  {
-    return isNonZero(stripNonNumeric(teamId, false, false));
-  }
-
-  public static String toHTMLEncode(String string)
-  {
-    if (string == null)
-    { return null; }
-    string = string.replaceAll("<", "&lt;");
-    string = string.replaceAll("\n", "<br />");
-    return string;
-  }
-
-  public static String toJavaScriptEncode(String string)
-  {
-    if (string == null)
-    { return "null"; }
-    string = string.replaceAll("\"", "\\\\\"");
-    string = string.replaceAll("\r", "\\\\r");
-    string = string.replaceAll("\n", "\\\\n");
-    return "\"" + string + "\"";
-  }
-
-  public static boolean isIn(String target, String... fromList)
-  {
-    return Arrays.asList(fromList).contains(target);
-  }
-
-  public static boolean isIn(String target, String[] fromList, boolean allowNulls)
-  {
-    return (target == null && allowNulls) ? true : isIn(target, fromList);
-  }
 
-  public static void assertIn(String target, String[] fromList, boolean allowNulls)
-  {
-    boolean valid = isIn(target, fromList, allowNulls);
-    if (!valid)
-    { throw new IllegalArgumentException("The value '" + target + "' not in " + Arrays.asList(fromList)); }
-  }
-
-  public static void assertIn(String target, boolean allowNulls, String... options)
-  {
-    assertIn(target, options, allowNulls);
-  }
-
-  public static String convertEnumeration(final Object forValue, Class<?> clazz)
-  {
-    Function1<Field, Boolean> filter = a -> {
-      try
-      {
-        return (ClassUtils.IsPublicStatic(a) && a.get(null).equals(forValue));
-      }
-      catch (Throwable e)
-      {
-        throw ObjectUtils.throwAsError(e);
-      }
-    };
-    List<Field> fields = Query.where(clazz.getFields(), filter);
-    if (fields.isEmpty())
-    {
-      return "unknown Type " + forValue;
-    }
-    else
-    {
-      return fields.get(0).getName();
-    }
-  }
-
-  /**
-   * 'Tom S Hardy' becomes 'Tom S' - 'Hardy'
-   **/
-  public static String[] splitName(String fullName)
-  {
-    String[] names = {null, null};
-    int split = fullName.lastIndexOf(' ');
-    if (split != -1)
-    {
-      names[0] = fullName.substring(0, split);
-      names[1] = fullName.substring(split);
-    }
-    else
-    {
-      names[1] = fullName;
-    }
-    return names;
-  }
-
-  public static Properties createProperties(String[] properties)
-  {
-    Properties props = new Properties();
-    if (properties == null)
-    { return props; }
-    if (properties.length % 2 != 0)
-    {
-      throw new Error(
-          "number of strings must be even. found [" + properties.length + "] = " + Arrays.asList(properties));
-    }
-    for (int i = 0; i < properties.length; i += 2)
-    {
-      if (properties[i + 1] != null)
-      {
-        props.setProperty(properties[i], properties[i + 1]);
-      }
-      else
-      {
-        props.setProperty(properties[i], "");
-      }
-    }
-    return props;
-  }
-
-  public static <T> String toString(String name, T[] array)
-  {
-    StringBuffer buffer = new StringBuffer();
-    name = (name == null ? "array" : name);
-    if (array == null || array.length == 0)
-    {
-      buffer.append(name + ".length = 0");
-    }
-    else
-    {
-      int maxPadding = ("" + array.length).length();
-      for (int i = 0; i < array.length; i++)
-      {
-        buffer.append(name + "[" + padNumber(i, maxPadding) + "] = " + array[i] + "\n");
-      }
-    }
-    return buffer.toString();
-  }
-
-  public static <T> String toString(String name, Iterable<T> array)
-  {
-    StringBuffer buffer = new StringBuffer();
-    name = (name == null ? "array" : name);
-    if (array != null)
-    {
-      int count = 0;
-      for (T t : array)
-      {
-        buffer.append(name + "[" + count + "] = " + arrayStringHelper(t) + "\n");
-        count++;
-      }
-    }
-    if (buffer.length() == 0)
-    {
-      buffer.append(name + ".length = 0");
-    }
-    return buffer.toString();
-  }
-
-  public static String arrayStringHelper(Object o)
-  {
-    if (o == null)
-    { return "null"; }
-    return o.getClass().isArray() ? Arrays.toString((Object[]) o) : o.toString();
-  }
-
-  public static String getFirstName(String fullName)
-  {
-    return splitName(fullName)[0];
-  }
-
-  public static String getLastName(String fullName)
-  {
-    return splitName(fullName)[1];
-  }
-
-  public static boolean isLengthWithin(String string, int length)
-  {
-    return string == null || string.length() <= length;
-  }
-
-  public static boolean equalsIgnoreCase(String one, String two)
-  {
-    return (one == two || (one != null && one.equalsIgnoreCase(two)));
-  }
-
-  public static StringBuffer trim(StringBuffer buffer, int i)
-  {
-    if (buffer == null || buffer.length() < i)
-    { return buffer; }
-    buffer.setLength(buffer.length() - i);
-    return buffer;
-  }
-
-  public static String join(String first, String joinBy, String second)
-  {
-    return isEmpty(second) ? first : first + joinBy + second;
-  }
-
-  public static InputStream convertToInputStream(String string)
-  {
-    return new ByteArrayInputStream(string.getBytes(StandardCharsets.UTF_8));
-  }
-
-  public static String toString(Map<?, ?> map)
-  {
-    StringBuffer b = new StringBuffer();
-    Object[] keySet = map.keySet().toArray();
-    boolean isKeyComparable = ArrayUtils.isEmpty(keySet) || keySet[0] instanceof Comparable;
-    if (!(map instanceof SortedMap))
-    {
-      if (isKeyComparable)
-      {
-        Arrays.sort(keySet);
-      }
-      else
-      {
-        Arrays.sort(keySet, Comparator.comparing(Object::toString));
-      }
-    }
-    for (Object key : keySet)
-    {
-      b.append(String.format("%s : %s \n", key, map.get(key)));
-    }
-    return b.toString();
-  }
-
-  public static <T> String join(T[] list, String delimiter, Function1<T, String> convertor)
-  {
-    return String.join(delimiter, Query.select(list, convertor));
-  }
-
-  public static <T> String join(Collection<T> list, String joinWith)
-  {
-    return join(list, joinWith, n -> n.toString());
-  }
-
-  public static <T> String join(Collection<T> list, String joinWith, Function1<T, String> converter)
-  {
-    return String.join(joinWith, Query.select(list, converter));
-  }
-
-  public static String replaceAll(String input, Pattern pattern, Function1<String, String> replacer)
-  {
-    Matcher matcher = pattern.matcher(input);
-    boolean result = matcher.find();
-    if (result)
-    {
-      StringBuilder sb = new StringBuilder();
-      int start = 0;
-      do
-      {
-        sb.append(input, start, matcher.start());
-        sb.append(replacer.call(matcher.group()));
-        start = matcher.end();
-        result = matcher.find();
-      }
-      while (result);
-      sb.append(input.substring(start));
-      return sb.toString();
-    }
-    return input;
-  }
-
-  public static String pad(String contents, int targetLength)
-  {
-    while (contents.length() < targetLength)
-    {
-      contents += " ";
-      if (contents.length() < targetLength)
-      {
-        contents = " " + contents;
-      }
-    }
-    return contents;
-  }
-
-  public static String padLeft(String contents, int targetLength)
-  {
-    while (contents.length() < targetLength)
-    {
-      contents = " " + contents;
-    }
-    return contents;
-  }
-
-  public static String padRight(String contents, int targetLength)
-  {
-    while (contents.length() < targetLength)
-    {
-      contents = contents + " ";
-    }
-    return contents;
-  }
-
-  public static String removeFromEnd(String contents, String text)
-  {
-    return removeFromEnd(contents, text.length());
-  }
-
-  public static String removeFromEnd(String contents, int length)
-  {
-    return contents.substring(0, contents.length() - length);
-  }
-
-  public static String repeat(String string, int times)
-  {
-    return new String(new char[times]).replace("\0", string);
-  }
 
   public static String ensureEnding(String contents, String desiredEnding)
com/spun/util/ArrayUtils.java 405 → 75 lines (-330)
@@ -2,19 +2,11 @@ package com.spun.util;
 
 import org.lambda.functions.Function0;
-import org.lambda.functions.Function1;
-import org.lambda.query.Queryable;
 
-import java.lang.reflect.Array;
-import java.lang.reflect.Method;
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.Collection;
 import java.util.Collections;
-import java.util.Comparator;
-import java.util.HashMap;
-import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
-import java.util.Vector;
 import java.util.stream.StreamSupport;
 
@@ -24,20 +16,4 @@ import java.util.stream.StreamSupport;
 public class ArrayUtils
 {
-  public static <T> java.util.Collection<T> addArray(java.util.Collection<T> v, T[] array)
-  {
-    if ((array == null) || (v == null))
-    { return v; }
-    for (int i = 0; i < array.length; i++)
-    {
-      v.add(array[i]);
-    }
-    return v;
-  }
-
-  public static <T> String toString(T[] values, Function1<T, String> formatter)
-  {
-    return toString(asList(values), formatter);
-  }
-
   public static <T> List<T> asList(T[] values)
   {
@@ -45,59 +21,4 @@ public class ArrayUtils
   }
 
-  public static <T> String toString(Iterable<T> values, Function1<T, String> formatter)
-  {
-    StringBuffer b = new StringBuffer();
-    for (T t : values)
-    {
-      b.append(formatter.call(t) + "\n");
-    }
-    return b.toString();
-  }
-
-  /**
-   * @deprecated for removal in 16.0.0
-   */
-  @Deprecated
-  public static Vector<Object> toReverseVector(Vector<Object> vector)
-  {
-    Vector<Object> reverse = new Vector<>(vector.size());
-    for (int i = vector.size() - 1; i >= 0; i--)
-    {
-      reverse.add(vector.elementAt(i));
-    }
-    return reverse;
-  }
-
-  public static <T> T[] toReverseArray(T[] array)
-  {
-    for (int i = 0; i < array.length / 2; i++)
-    {
-      T o1 = array[i];
-      int end = array.length - i - 1;
-      T o2 = array[end];
-      array[i] = o2;
-      array[end] = o1;
-    }
-    return array;
-  }
-
-  public static <T> T[] addToArray(T[] array, T... objects)
-  {
-    return combine(array, objects);
-  }
-
-  public static <T> T[] getSubsection(T[] array, int startInclusive, int endExclusive)
-  {
-    int length = endExclusive - startInclusive;
-    length = length > array.length ? array.length : length;
-    T[] newArray = (T[]) Array.newInstance(array.getClass().getComponentType(), length);
-    System.arraycopy(array, startInclusive, newArray, 0, length);
-    return newArray;
-  }
-
-  public static boolean isEmpty(Object[] array)
-  {
-    return ((array == null) || (array.length == 0));
-  }
 
   public static boolean isEmpty(Iterable<?> collection)
@@ -106,206 +27,4 @@ public class ArrayUtils
   }
 
-  public static <T> T getSingleton(T[] parts)
-  {
-    if (parts == null)
-    { return null; }
-    switch (parts.length)
-    {
-      case 0 :
-        return null;
-      case 1 :
-        return parts[0];
-      default :
-        throw new Error("Called with more than one object in the array " + Arrays.asList(parts));
-    }
-  }
-
-  public static <T> T getFirst(T[] array)
-  {
-    return array == null || array.length == 0 ? null : array[0];
-  }
-
-  public static <H, T extends H> T getFirst(T[] array, Comparator<H> compartor)
-  {
-    return get(array, compartor, true);
-  }
-
-  public static <H, T extends H> T getFirst(Collection<T> array, Comparator<H> sorter)
-  {
-    return get((T[]) array.toArray(), sorter, true);
-  }
-
-  public static <T> T getLast(T[] array)
-  {
-    if (array == null || array.length < 1)
-    { return null; }
-    return array[array.length - 1];
-  }
-
-  public static <T> T getLast(T[] array, Comparator<T> sorter)
-  {
-    return get(array, sorter, false);
-  }
-
-  public static <T> T getLast(Collection<T> array, Comparator<T> sorter)
-  {
-    return get((T[]) array.toArray(), sorter, false);
-  }
-
-  private static <H, T extends H> T get(T[] array, Comparator<H> sorter, boolean wantFirst)
-  {
-    if (isEmpty(array))
-    { return null; }
-    T last = array[0];
-    for (int i = 1; i < array.length; i++)
-    {
-      int compare = sorter.compare(last, array[i]);
-      if ((wantFirst && compare > 0) || (!wantFirst && compare < 0))
-      {
-        last = array[i];
-      }
-    }
-    return last;
-  }
-
-  public static List<?> combineResults(Object[] array, String invokeMethod)
-  {
-    if (ArrayUtils.isEmpty(array))
-    { return Collections.EMPTY_LIST; }
-    try
-    {
-      return combineResults(array, ObjectUtils.getGreatestCommonDenominator(array, invokeMethod));
-    }
-    catch (Exception e)
-    {
-      throw ObjectUtils.throwAsError(e);
-    }
-  }
-
-  @SuppressWarnings("rawtypes")
-  public static List combineResults(Object[] array, Method method)
-  {
-    if (isEmpty(array))
-    { return new ArrayList(0); }
-    try
-    {
-      ArrayList<Object> list = new ArrayList<Object>();
-      for (int i = 0; i < array.length; i++)
-      {
-        addArray(list, (Object[]) method.invoke(array[i], (Object[]) null));
-      }
-      return list;
-    }
-    catch (Throwable e)
-    {
-      throw ObjectUtils.throwAsError(e);
-    }
-  }
-
-  public static <T> T[] combine(T[] a, T[] b)
-  {
-    if (isEmpty(a) && isEmpty(b))
-    {
-      if (a != null)
-      {
-        return (T[]) Array.newInstance(a.getClass().getComponentType(), 0);
-      }
-      else if (b != null)
-      {
-        return (T[]) Array.newInstance(b.getClass().getComponentType(), 0);
-      }
-      else
-      {
-        return (T[]) Collections.emptyList().toArray();
-      }
-    }
-    else if (isEmpty(a))
-    {
-      return b;
-    }
-    else if (isEmpty(b))
-    {
-      return a;
-    }
-    else
-    {
-      T[] newArray = (T[]) Array.newInstance(a.getClass().getComponentType(), a.length + b.length);
-      System.arraycopy(a, 0, newArray, 0, a.length);
-      System.arraycopy(b, 0, newArray, a.length, b.length);
-      return newArray;
-    }
-  }
-
-  public static <T> T[] combine(T a, T... b)
-  {
-    if (b == null)
-    {
-      b = (T[]) Array.newInstance(getClassFor(a), 1);
-    }
-    final Class<?> type = b.getClass().getComponentType();
-    final T[] toArray = (T[]) Array.newInstance(type, 1);
-    toArray[0] = a;
-    return combine(toArray, b);
-  }
-
-  private static <T> Class<?> getClassFor(T object)
-  {
-    return object != null ? object.getClass() : Object.class;
-  }
-
-  public static <T> boolean contains(T[] values, T value)
-  {
-    for (int i = 0; i < values.length; i++)
-    {
-      if (value.equals(values[i]))
-      { return true; }
-    }
-    return false;
-  }
-
-  public static boolean contains(int[] values, int value)
-  {
-    for (int i = 0; i < values.length; i++)
-    {
-      if (value == values[i])
-      { return true; }
-    }
-    return false;
-  }
-
-  public static <T> T getLast(List<T> list)
-  {
-    return list.get(list.size() - 1);
-  }
-
-  public static <K, T> T getDefault(HashMap<K, T> map, K key, T defaultValue)
-  {
-    T value = map.get(key);
-    if (value == null)
-    {
-      map.put(key, defaultValue);
-      value = defaultValue;
-    }
-    return value;
-  }
-
-  public static <K, V> int countValues(HashMap<K, V> out, V matching)
-  {
-    return count(matching, out.values());
-  }
-
-  public static <V> int count(V matching, Collection<V> values)
-  {
-    int count = 0;
-    for (V value : values)
-    {
-      if (matching.equals(value))
-      {
-        count++;
-      }
-    }
-    return count;
-  }
-
   public static <T> List<T> combine(List<T> list1, List<T> list2)
   {
@@ -316,19 +35,4 @@ public class ArrayUtils
   }
 
-  public static <T> Iterable<T> asIterable(Iterator<T> iterator)
-  {
-    return new IterableWrapper<T>(iterator);
-  }
-
-  public static <T> T[] toArray(List<T> list)
-  {
-    return Queryable.as(list).asArray();
-  }
-
-  public static <T> T[] toArray(List<T> list, Class<T> type)
-  {
-    return Queryable.as(list, type).asArray();
-  }
-
   public static <KEY, VALUES, SPECIFIC_VALUE extends VALUES> SPECIFIC_VALUE getOrElse(Map<KEY, VALUES> fields,
       KEY key, Function0<SPECIFIC_VALUE> defaultIfNotFound)
@@ -344,24 +48,4 @@ public class ArrayUtils
   }
 
-  public static Collection<Character> asList(char[] toCharArray)
-  {
-    ArrayList<Character> allChars = new ArrayList<>();
-    for (char ch : toCharArray)
-    {
-      allChars.add(ch);
-    }
-    return allChars;
-  }
-
-  public static <T> T[] of(T valueOfEachElement, int sizeOfArray)
-  {
-    Queryable<T> queryable = new Queryable(valueOfEachElement.getClass());
-    for (int i = 0; i < sizeOfArray; i++)
-    {
-      queryable.add(valueOfEachElement);
-    }
-    return queryable.asArray();
-  }
-
   public static <In> int size(Iterable<In> array)
   {
@@ -389,17 +73,3 @@ public class ArrayUtils
     return last;
   }
-  public static class IterableWrapper<T> implements Iterable<T>
-  {
-    private final Iterator<T> iterator;
-    public IterableWrapper(Iterator<T> iterator)
-    {
-      this.iterator = iterator;
-    }
-
-    @Override
-    public Iterator<T> iterator()
-    {
-      return iterator;
-    }
-  }
 }
com/spun/util/io/FileUtils.java 517 → 191 lines (-326)
@@ -7,24 +7,13 @@ import java.awt.image.BufferedImage;
 import java.io.BufferedReader;
 import java.io.BufferedWriter;
-import java.io.DataOutputStream;
 import java.io.File;
-import java.io.FileFilter;
-import java.io.FileInputStream;
-import java.io.FileOutputStream;
 import java.io.IOException;
 import java.io.InputStream;
 import java.io.InputStreamReader;
-import java.io.OutputStream;
 import java.io.Reader;
-import java.nio.channels.FileChannel;
 import java.nio.charset.CharsetDecoder;
 import java.nio.charset.CodingErrorAction;
 import java.nio.charset.StandardCharsets;
 import java.nio.file.*;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.stream.Collectors;
-import java.util.stream.Stream;
-
 /**
  * A static class of convenience functions for Files
@@ -32,134 +21,4 @@ import java.util.stream.Stream;
 public class FileUtils
 {
-  public static File createTempDirectory()
-  {
-    File tempFile = ObjectUtils.throwAsError(() -> File.createTempFile("TEMP", null));
-    tempFile.delete();
-    tempFile.mkdirs();
-    return tempFile;
-  }
-
-  public static void deleteDirectory(File directory)
-  {
-    // delete all directory
-    File[] directories = directory.listFiles(new SimpleDirectoryFilter());
-    for (int i = 0; i < directories.length; i++)
-    {
-      deleteDirectory(directories[i]);
-    }
-    // Delete all Files.
-    File[] files = directory.listFiles(new SimpleFileFilter());
-    for (int i = 0; i < files.length; i++)
-    {
-      files[i].delete();
-    }
-    // delete self.
-    directory.delete();
-  }
-
-  public static String readFromClassPath(Class<?> clazz, String string)
-  {
-    final InputStream resourceAsStream = clazz.getResourceAsStream(string);
-    if (resourceAsStream == null)
-    {
-      String message = String.format("Could not find %s from %s", string, clazz.getName());
-      throw new RuntimeException(message);
-    }
-    String resource = FileUtils.readStream(resourceAsStream);
-    return resource;
-  }
-
-  public static File[] getRecursiveFileList(File directory)
-  {
-    return getRecursiveFileList(directory, new SimpleFileFilter());
-  }
-
-  public static File[] getRecursiveFileList(File directory, FileFilter filter)
-  {
-    ArrayList<File> list = new ArrayList<File>();
-    if (!directory.isDirectory())
-    { throw new Error("File is not a directory: " + directory.getName()); }
-    File[] directories = directory.listFiles(new SimpleDirectoryFilter());
-    directories = directories == null ? new File[0] : directories;
-    for (int i = 0; i < directories.length; i++)
-    {
-      ArrayUtils.addArray(list, getRecursiveFileList(directories[i], filter));
-    }
-    File[] files = directory.listFiles(filter);
-    ArrayUtils.addArray(list, files);
-    return list.toArray(new File[list.size()]);
-  }
-
-  public static void copyFile(File in, File out)
-  {
-    try
-    {
-      out.getParentFile().mkdirs();
-      try (FileInputStream sIn = new FileInputStream(in))
-      {
-        try (FileChannel inChannel = sIn.getChannel())
-        {
-          try (FileOutputStream sOut = new FileOutputStream(out))
-          {
-            try (FileChannel outChannel = sOut.getChannel())
-            {
-              outChannel.transferFrom(inChannel, 0, inChannel.size());
-            }
-          }
-        }
-      }
-    }
-    catch (Exception e)
-    {
-      ObjectUtils.throwAsError(e);
-    }
-  }
-
-  public static void copyStream(InputStream in, OutputStream out)
-  {
-    try
-    {
-      byte[] buf = new byte[1024];
-      int i = 0;
-      while ((i = in.read(buf)) != -1)
-      {
-        out.write(buf, 0, i);
-      }
-      in.close();
-      out.close();
-    }
-    catch (Throwable t)
-    {
-      throw ObjectUtils.throwAsError(t);
-    }
-  }
-
-  public static void redirectInputToFile(String fileName, InputStream in)
-  {
-    try
-    {
-      FileOutputStream fos = new FileOutputStream(new File(fileName), false);
-      copyStream(in, fos);
-    }
-    catch (Throwable t)
-    {
-      throw ObjectUtils.throwAsError(t);
-    }
-  }
-
-  public static void copyFileToDirectory(String file, File tempDir)
-  {
-    try
-    {
-      File in = new File(file);
-      File out = new File(tempDir, in.getName());
-      copyFile(in, out);
-    }
-    catch (Throwable t)
-    {
-      throw ObjectUtils.throwAsError(t);
-    }
-  }
-
   public static void appendToFile(File file, String text)
   {
@@ -197,43 +56,4 @@ public class FileUtils
   }
 
-  public static void writeFileQuietly(File file, String text)
-  {
-    writeFile(file, text);
-  }
-
-  public static void writeFile(File file, CharSequence data)
-  {
-    try
-    {
-      Asserts.assertNotNull("Writing to file: " + file, data);
-      file.getCanonicalFile().getParentFile().mkdirs();
-      try (DataOutputStream writer = new DataOutputStream(new FileOutputStream(file)))
-      {
-        for (int i = 0; i < data.length(); i++)
-        {
-          writer.write(data.charAt(i));
-        }
-      }
-    }
-    catch (Throwable t)
-    {
-      throw ObjectUtils.throwAsError(t);
-    }
-  }
-
-  public static void writeFile(File file, InputStream data)
-  {
-    try
-    {
-      Asserts.assertNotNull("Writing to file: " + file, data);
-      file.getCanonicalFile().getParentFile().mkdirs();
-      copyStream(data, new FileOutputStream(file));
-    }
-    catch (Throwable t)
-    {
-      throw ObjectUtils.throwAsError(t);
-    }
-  }
-
   public static String readFile(String absolutePath)
   {
@@ -293,59 +113,4 @@ public class FileUtils
   }
 
-  public static String readFileWithSuppressedExceptions(File databaseFile)
-  {
-    return FileUtils.readFile(databaseFile);
-  }
-
-  public static File saveToFile(String prefix, Reader input)
-  {
-    return saveToFile(prefix, null, input);
-  }
-
-  public static File saveToFile(String prefix, String extensionWithDot, Reader input)
-  {
-    try
-    {
-      File file = File.createTempFile(prefix, extensionWithDot);
-      try (BufferedWriter bw = Files.newBufferedWriter(file.toPath(), StandardCharsets.UTF_8))
-      {
-        try (BufferedReader inputReader = new BufferedReader(input))
-        {
-          String thisLine;
-          while ((thisLine = inputReader.readLine()) != null)
-          {
-            bw.write(thisLine);
-            bw.newLine();
-          }
-        }
-      }
-      return file;
-    }
-    catch (IOException e)
-    {
-      throw new FormattedException("Failed to save file (prefix, message): %s, %s", prefix, e.getMessage());
-    }
-  }
-
-  public static String getDirectoryFriendlyName(String name)
-  {
-    if (name == null)
-    { return ""; }
-    StringBuffer result = new StringBuffer();
-    for (int i = 0; i < name.length(); i++)
-    {
-      char c = name.charAt(i);
-      switch (c)
-      {
-        case '.' :
-          break;
-        default :
-          result.append(c);
-          break;
-      }
-    }
-    return result.toString();
-  }
-
   public static String getExtensionWithDot(String filename)
   {
@@ -354,9 +119,4 @@ public class FileUtils
   }
 
-  public static String getExtensionWithoutDot(String filename)
-  {
-    return getExtensionWithDot(filename).substring(1);
-  }
-
   public static void createIfNeeded(String file)
   {
@@ -406,65 +166,4 @@ public class FileUtils
   }
 
-  public static char[] loadResourceFromClasspathAsBytes(Class<?> clazz, String name)
-  {
-    return extractBytes(clazz.getResourceAsStream(name));
-  }
-
-  public static char[] extractBytes(final InputStream resourceAsStream)
-  {
-    try
-    {
-      ArrayList<Character> data = new ArrayList<Character>();
-      int b = resourceAsStream.read();
-      while (b != -1)
-      {
-        data.add(new Character((char) b));
-        b = resourceAsStream.read();
-      }
-      return FileUtils.toChars(data);
-    }
-    catch (Throwable t)
-    {
-      throw ObjectUtils.throwAsError(t);
-    }
-  }
-
-  public static char[] toChars(List<Character> data)
-  {
-    char[] out = new char[data.size()];
-    for (int i = 0; i < out.length; i++)
-    {
-      out[i] = data.get(i);
-    }
-    return out;
-  }
-
-  public static boolean isNonEmptyFile(String approved)
-  {
-    File file = new File(approved);
-    return file.exists() && file.length() > 0;
-  }
-
-  public static void ensureParentDirectoriesExist(File file)
-  {
-    File dir = file.getParentFile();
-    if (!dir.exists())
-    {
-      dir.mkdirs();
-    }
-  }
-
-  public static String readFile(File file, String defaultText)
-  {
-    try
-    {
-      return readFile(file);
-    }
-    catch (Throwable e)
-    {
-      return defaultText;
-    }
-  }
-
   public static String getCurrentDirectory()
   {
@@ -479,29 +178,4 @@ public class FileUtils
   }
 
-  public static void delete(String filePath)
-  {
-    delete(new File(filePath));
-  }
-
-  public static void delete(File file)
-  {
-    if (file.exists())
-    {
-      file.delete();
-    }
-  }
-
-  public static Stream<Path> walkPath(String channelsPath, int maxDepth)
-  {
-    try
-    {
-      return Files.walk(Paths.get(channelsPath), maxDepth, FileVisitOption.FOLLOW_LINKS);
-    }
-    catch (IOException e)
-    {
-      throw ObjectUtils.throwAsError(e);
-    }
-  }
-
   public static String getResolvedPath(File file)
   {
org/approvaltests/Approvals.java 382 → 67 lines (-315)
@@ -1,10 +1,4 @@
 package org.approvaltests;
 
-import com.spun.util.ArrayUtils;
-import com.spun.util.FormattedException;
-import com.spun.util.ObjectUtils;
-import com.spun.util.StringUtils;
-import com.spun.util.io.XMLUtils;
-import com.spun.util.persistence.ExecutableCommand;
 import com.spun.util.persistence.Loader;
 import org.approvaltests.approvers.ApprovalApprover;
@@ -13,25 +7,8 @@ import org.approvaltests.core.ApprovalFailureReporter;
 import org.approvaltests.core.ApprovalWriter;
 import org.approvaltests.core.Options;
-import org.approvaltests.core.Verifiable;
-import org.approvaltests.core.VerifyParameters;
 import org.approvaltests.core.VerifyResult;
 import org.approvaltests.namer.ApprovalNamer;
-import org.approvaltests.namer.MasterDirectoryNamer;
 import org.approvaltests.namer.NamerFactoryForOptions;
 import org.approvaltests.namer.StackTraceNamer;
-import org.approvaltests.reporters.ExecutableQueryFailure;
-import org.lambda.actions.Action0;
-import org.lambda.functions.Function1;
-import org.lambda.query.Query;
-
-import java.io.File;
-import java.io.FileFilter;
-import java.io.FilenameFilter;
-import java.nio.file.Path;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
-import java.util.Map;
-import java.util.Objects;
 
 public class Approvals
@@ -55,163 +32,4 @@ public class Approvals
   }
 
-  public static void verify(Object object)
-  {
-    verify(object, new Options());
-  }
-
-  public static void verify(Object object, Options options)
-  {
-    checkForAwtComponents(object == null ? Object.class : object.getClass());
-    verify(Objects.toString(object), options);
-  }
-
-  public static void verify(Verifiable object)
-  {
-    verify(object, new Options());
-  }
-
-  public static void verify(Verifiable object, Options options)
-  {
-    VerifyParameters verifyParameters = object.getVerifyParameters(options);
-    verify(Objects.toString(object), verifyParameters.getOptions());
-  }
-
-  private static void checkForAwtComponents(Class<?> type)
-  {
-    if (type == Object.class)
-    { return; }
-    if ("java.awt.Component".equals(type.getCanonicalName()))
-    {
-      throw new FormattedException(
-          "Approvals.verify(Component) has moved to AwtApprovals.verify(Component)\ncalled Approvals.verify(Object)");
-    }
-    checkForAwtComponents(type.getSuperclass());
-  }
-
-  public static <T> void verifyAll(String label, T[] array)
-  {
-    verifyAll(label, array, new Options());
-  }
-
-  public static <T> void verifyAll(String label, T[] array, Options options)
-  {
-    verify(StringUtils.toString(label, array), options);
-  }
-
-  public static <T> void verifyAll(String header, String label, T[] array)
-  {
-    verifyAll(header, label, array, new Options());
-  }
-
-  public static <T> void verifyAll(String header, String label, T[] array, Options options)
-  {
-    String text = formatHeader(header) + StringUtils.toString(label, array);
-    verify(text, options);
-  }
-
-  public static <T> void verifyAll(T[] values, Function1<T, String> formatter)
-  {
-    verifyAll(values, formatter, new Options());
-  }
-
-  public static <T> void verifyAll(Iterable<T> values, Function1<T, String> formatter)
-  {
-    verifyAll(values, formatter, new Options());
-  }
-
-  public static <T> void verifyAll(Iterable<T> values, Function1<T, String> formatter, Options options)
-  {
-    verifyAll("", values, formatter, options);
-  }
-
-  public static <T> void verifyAll(T[] values, Function1<T, String> formatter, Options options)
-  {
-    String text = ArrayUtils.toString(values, formatter);
-    verify(text, options);
-  }
-
-  public static <T> void verifyAll(String header, T[] values, Function1<T, String> formatter)
-  {
-    verifyAll(header, values, formatter, new Options());
-  }
-
-  public static <T> void verifyAll(String header, T[] values, Function1<T, String> formatter, Options options)
-  {
-    verifyAll(header, Arrays.asList(values), formatter, options);
-  }
-
-  public static <T> void verifyAll(String header, Iterable<T> array, Function1<T, String> formatter)
-  {
-    verifyAll(header, array, formatter, new Options());
-  }
-
-  public static <T> void verifyAll(String header, Iterable<T> array, Function1<T, String> formatter,
-      Options options)
-  {
-    String text = formatHeader(header) + ArrayUtils.toString(array, formatter);
-    verify(text, options);
-  }
-
-  private static String formatHeader(String header)
-  {
-    return StringUtils.isEmpty(header) ? "" : header + "\n\n\n";
-  }
-
-  public static <T> void verifyAll(String label, Iterable<T> array)
-  {
-    verifyAll(label, array, new Options());
-  }
-
-  public static <T> void verifyAll(String label, Iterable<T> array, Options options)
-  {
-    verify(StringUtils.toString(label, array), options);
-  }
-
-  public static <T> void verifyAll(String header, String label, Iterable<T> array)
-  {
-    verifyAll(header, label, array, new Options());
-  }
-
-  public static <T> void verifyAll(String header, String label, Iterable<T> array, Options options)
-  {
-    String text = formatHeader(header) + StringUtils.toString(label, array);
-    verify(text, options);
-  }
-
-  public static void verifyHtml(String response)
-  {
-    verifyHtml(response, new Options());
-  }
-
-  public static void verifyHtml(String response, Options options)
-  {
-    verify(response, options.forFile().withExtension(".html"));
-  }
-
-  public static void verify(Path path)
-  {
-    verify(path, new Options());
-  }
-
-  public static void verify(Path path, Options options)
-  {
-    verify(path.toFile(), options);
-  }
-
-  public static void verify(File file)
-  {
-    verify(file, new Options());
-  }
-
-  public static void verify(File file, Options options)
-  {
-    verify(options.createWriter(file), options);
-  }
-
-  public static void verify(ApprovalWriter writer, ApprovalNamer namer)
-  {
-    verify(writer, namer, new Options());
-  }
-
   public static void verify(ApprovalWriter writer, ApprovalNamer namer, Options options)
   {
@@ -219,9 +37,4 @@ public class Approvals
   }
 
-  public static void verify(ApprovalWriter writer)
-  {
-    verify(writer, new Options());
-  }
-
   public static void verify(ApprovalWriter writer, Options options)
   {
@@ -229,30 +42,4 @@ public class Approvals
   }
 
-  public static void verifyXml(String xml)
-  {
-    verifyXml(xml, new Options());
-  }
-
-  public static void verifyXml(String xml, Options options)
-  {
-    verifyXml(xml, x -> XMLUtils.prettyPrint(x, 2), options);
-  }
-
-  public static void verifyXml(String xml, Function1<String, String> prettyPrinter)
-  {
-    verifyXml(xml, prettyPrinter, new Options());
-  }
-
-  public static void verifyXml(String xml, Function1<String, String> prettyPrinter, Options options)
-  {
-    String formattedXml = prettyPrinter.call(xml);
-    verify(formattedXml, options.forFile().withExtension(".xml"));
-  }
-
-  public static void verify(ApprovalApprover approver)
-  {
-    verify(approver, new Options());
-  }
-
   public static void verify(ApprovalApprover approver, Options options)
   {
@@ -274,109 +61,7 @@ public class Approvals
   }
 
-  public static void verify(ExecutableCommand query)
-  {
-    verify(query, new Options());
-  }
-
-  public static void verify(ExecutableCommand query, Options options)
-  {
-    verify(query.getCommand(), ExecutableQueryFailure.create(query, options));
-  }
-
-  public static void verify(Map<?, ?> map)
-  {
-    verify(map, new Options());
-  }
-
-  public static void verify(Map<?, ?> map, Options options)
-  {
-    verify(StringUtils.toString(map), options);
-  }
-
   public static ApprovalNamer createApprovalNamer()
   {
     return namerCreater.load();
   }
-
-  public static void verifyEachFileInDirectory(File directory)
-  {
-    verifyEachFileInDirectory(directory, new Options());
-  }
-
-  public static void verifyEachFileInDirectory(File directory, Options options)
-  {
-    verifyEachFileAgainstMasterDirectory(directory.listFiles(), options);
-  }
-
-  public static void verifyEachFileInDirectory(File directory, FileFilter filter)
-  {
-    verifyEachFileInDirectory(directory, filter, new Options());
-  }
-
-  public static void verifyEachFileInDirectory(File directory, FileFilter filter, Options options)
-  {
-    verifyEachFileAgainstMasterDirectory(directory.listFiles(filter), options);
-  }
-
-  public static void verifyEachFileInDirectory(File directory, FilenameFilter filter)
-  {
-    verifyEachFileInDirectory(directory, filter, new Options());
-  }
-
-  public static void verifyEachFileInDirectory(File directory, FilenameFilter filter, Options options)
-  {
-    verifyEachFileAgainstMasterDirectory(directory.listFiles(filter), options);
-  }
-
-  private static void verifyEachFileAgainstMasterDirectory(File[] files, Options options)
-  {
-    List<File> mismatched = new ArrayList<>();
-    for (File f : files)
-    {
-      if (!f.isDirectory())
-      {
-        try
-        {
-          verify(options.createWriter(f), new MasterDirectoryNamer(f, options), options);
-        }
-        catch (Throwable e)
-        {
-          mismatched.add(f);
-        }
-      }
-    }
-    if (!mismatched.isEmpty())
-    {
-      String message = "The Following Files did not match up: " + getFileNameList(mismatched);
-      throw new Error(message);
-    }
-  }
-
-  private static String getFileNameList(List<File> mismatched)
-  {
-    return Query.select(mismatched, a -> a.getName()).toString();
-  }
-
-  public static ApprovalFailureReporter getReporter()
-  {
-    return ReporterFactory.get();
-  }
-
-  public static void verifyException(Action0 runnableBlock)
-  {
-    verifyException(runnableBlock, new Options());
-  }
-
-  public static void verifyException(Action0 runnableBlock, Options options)
-  {
-    Throwable t = ObjectUtils.captureException(runnableBlock);
-    if (t == null)
-    { throw new FormattedException("No exception thrown when running %s", runnableBlock); }
-    Approvals.verify(String.format("%s: %s", t.getClass().getName(), t.getMessage()), options);
-  }
-
-  public static ApprovalSettings settings()
-  {
-    return new ApprovalSettings();
-  }
 }
com/spun/util/DateDifference.java 318 → 78 lines (-240)
@@ -1,5 +1,4 @@
 package com.spun.util;
 
-import com.spun.util.logger.SimpleLogger;
 
 import java.util.Calendar;
@@ -73,246 +72,7 @@ public class DateDifference
   }
 
-  /**
-   * Debugging tool.
-   **/
-  public static void printDividers()
-  {
-    SimpleLogger.variable("max long = " + Long.MAX_VALUE);
-    for (int i = 0; i < DIVIDERS.length; i++)
-    {
-      SimpleLogger.variable("" + DIVIDERS[i]);
-    }
-  }
-
-  /**
-   * Gets the amount of [Units]. <BR>
-   * i.e. <BR>
-   * Given a  DateDifference of 2 Days 3 Hours 4 Minutes <BR>
-   * getAbsoluteDifference(Calendar.DATE) = 2
-   * getAbsoluteDifference(Calendar.HOUR) = 51
-   **/
-  public long getAbsoluteDifference(int unit)
-  {
-    return getAbsoluteDifference(unit, this.milli);
-  }
-
-  public long getAbsoluteDifference(String unit)
-  {
-    return getAbsoluteDifference(convertUnitString(unit));
-  }
-
-  public long getRoundedDifference(String unit)
-  {
-    return getRoundedDifference(convertUnitString(unit), this.milli);
-  }
-
-  public long getRoundedDifference(int unit)
-  {
-    return getRoundedDifference(unit, this.milli);
-  }
-
-  public static long getAbsoluteDifference(int unit, long time)
-  {
-    //    My_System.variable("divider = " + DIVIDERS[getIndex(unit)]);
-    return time / DIVIDERS[getTimeScaleIndex(unit)];
-  }
-
-  public static long getRoundedDifference(int unit, long time)
-  {
-    return Math.round(((double) time) / DIVIDERS[getTimeScaleIndex(unit)]);
-  }
-
-  /**
-   * Gets the remaining amount of [Units]. <BR>
-   * i.e. <BR>
-   * Given a  DateDifference of 1 Month 2 Weeks 3 Days,
-   * getRemainingDifference(days, months) = 17 days <BR>
-   * getRemainingDifference(days, weeks) = 3 days <BR>
-   **/
-  public long getRemainingDifference(int wantedUnit, int roundTo)
-  {
-    return getRemainingDifference(wantedUnit, roundTo, this.milli);
-  }
-
-  public static long getRemainingDifference(int wantedUnit, int roundTo, long time)
-  {
-    int wantedIndex = getTimeScaleIndex(wantedUnit);
-    int roundToIndex = getTimeScaleIndex(roundTo);
-    if (wantedIndex < roundToIndex)
-    {
-      throw new Error(
-          "Can't round with a smaller Unit.[" + TIME_UNITS[wantedIndex] + ", " + TIME_UNITS[roundToIndex] + "]");
-    }
-    //roundedDifference = (millis % (roundTo in millis)) / (unit in millis)
-    return (time % DIVIDERS[roundToIndex]) / DIVIDERS[wantedIndex];
-  }
-
-  /**
-   * @return the index in TIME_SCALE[] of the largest Unit to be > 0
-   **/
-  private int getMaximumTimeUnit()
-  {
-    int i = 0;
-    while ((i < DIVIDERS.length) && (milli < DIVIDERS[i]))
-    {
-      i++;
-    }
-    return i;
-  }
-
-  /**
-   * Finds the index for a Calendar.DATE ect.
-   * @return the index in TIME_SCALE[]
-   **/
-  public static int getTimeScaleIndex(int calendarTime)
-  {
-    int i = 0;
-    while (calendarTime != TIME_SCALE[i])
-    {
-      i++;
-    }
-    return i;
-  }
-
-  public static int convertUnitString(String unit)
-  {
-    int result = 0;
-    if (MILLISECONDS.equalsIgnoreCase(unit))
-    {
-      result = Calendar.MILLISECOND;
-    }
-    else if (SECONDS.equalsIgnoreCase(unit))
-    {
-      result = Calendar.SECOND;
-    }
-    else if (MINUTES.equalsIgnoreCase(unit))
-    {
-      result = Calendar.MINUTE;
-    }
-    else if (HOURS.equalsIgnoreCase(unit))
-    {
-      result = Calendar.HOUR;
-    }
-    else if (DAYS.equalsIgnoreCase(unit))
-    {
-      result = Calendar.DATE;
-    }
-    else if (WEEKS.equalsIgnoreCase(unit))
-    {
-      result = Calendar.WEEK_OF_YEAR;
-    }
-    else if (MONTHS.equalsIgnoreCase(unit))
-    {
-      result = Calendar.MONTH;
-    }
-    else if (YEARS.equalsIgnoreCase(unit))
-    {
-      result = Calendar.YEAR;
-    }
-    return result;
-  }
-
-  public static long convertUnitStringToMilli(String unit)
-  {
-    int cal = convertUnitString(unit);
-    return DIVIDERS[getTimeScaleIndex(cal)];
-  }
-
-  public boolean isMoreThan(int amount, int unit)
-  {
-    return (getAbsoluteDifference(unit) >= amount);
-  }
-
-  public boolean isMoreThan(int amount, String unitString)
-  {
-    return (getAbsoluteDifference(convertUnitString(unitString)) >= amount);
-  }
-
-  public long getStandardRoundedTime(int unitIndex, boolean forceAbsolute)
-  {
-    return getStandardRoundedTime(unitIndex, forceAbsolute, this.milli);
-  }
 
-  private static long getStandardRoundedTime(int unitIndex, boolean forceAbsolute, long time)
-  {
-    if (unitIndex == 0 || forceAbsolute)
-    {
-      return getAbsoluteDifference(TIME_SCALE[unitIndex], time);
-    }
-    else
-    {
-      return getRemainingDifference(TIME_SCALE[unitIndex], TIME_SCALE[unitIndex - 1], time);
-    }
-  }
 
-  public String getStandardTimeText(int amount, String maxUnit, String minUnit, String nowText, String agoText)
-  {
-    return getTimeText(amount, convertUnitString(maxUnit), convertUnitString(minUnit), nowText, agoText,
-        STANDARD_TIME_TEXT);
-  }
 
-  public String getTimeText(int amount, int maxUnit, int minUnit, String nowText, String agoText, String[] units)
-  {
-    //		My_System.variable("amount = " + amount + ", maxUnit = " + maxUnit +  ", minUnit = " + minUnit + ", nowText = " + nowText);
-    if (amount == 0)
-    { throw new Error("getTimeText() requires amount > 0"); }
-    maxUnit = getTimeScaleIndex(maxUnit);
-    minUnit = getTimeScaleIndex(minUnit);
-    int realMax = getMaximumTimeUnit();
-    String timeText = nowText;
-    if (realMax < maxUnit)
-    {
-      realMax = maxUnit;
-    }
-    if (realMax <= minUnit)
-    {
-      timeText = "";
-      long remainingTime = this.milli;
-      for (int i = realMax; i < (realMax + amount) && (i <= minUnit); i++)
-      {
-        long time = getStandardRoundedTime(i, i == realMax, remainingTime);
-        remainingTime -= time * DIVIDERS[i];
-        timeText += time + " " + units[(time == 1) ? i * 2 : i * 2 + 1] + ", ";
-        //My_System.variable("timeText = " + timeText);
-      }
-      timeText = timeText.substring(0, timeText.length() - 2);
-      if ((agoText != null) && (agoText.length() > 0))
-      {
-        timeText += " " + agoText;
-      }
-    }
-    return timeText;
-  }
 
-  public String getClockTimeText()
-  {
-    int maxUnit = getTimeScaleIndex(Calendar.HOUR);
-    int minUnit = getTimeScaleIndex(Calendar.MILLISECOND);
-    int realMax = getMaximumTimeUnit();
-    realMax = (realMax < maxUnit) ? maxUnit : realMax;
-    String timeText = "";
-    if (realMax <= minUnit)
-    {
-      for (int i = realMax; i <= minUnit; i++)
-      {
-        int padding = (i == getTimeScaleIndex(Calendar.MILLISECOND)) ? 3 : 2;
-        long time = getStandardRoundedTime(i, i == realMax);
-        if (i == realMax)
-        {
-          timeText += time + ":";
-        }
-        else
-        {
-          timeText += StringUtils.padNumber(time, padding) + ":";
-        }
-      }
-      timeText = timeText.substring(0, timeText.length() - 1);
-    }
-    return timeText;
-  }
-
-  public String getStandardTimeText(int amountShown)
-  {
-    return getTimeText(amountShown, Calendar.YEAR, Calendar.MILLISECOND, "now", "", STANDARD_TIME_TEXT);
-  }
 }
com/spun/util/parser/ParserCommons.java 224 → 10 lines (-214)
@@ -1,13 +1,4 @@
 package com.spun.util.parser;
 
-import com.spun.util.ObjectUtils;
-import com.spun.util.PhoneNumber;
-import com.spun.util.parser.VelocityList.Item;
-import com.spun.util.velocity.ParserDateUtils;
-
-import java.util.Collection;
-import java.util.Collections;
-import java.util.Date;
-import java.util.List;
 
 public class ParserCommons
@@ -17,208 +8,3 @@ public class ParserCommons
   public static TemplateDate        today       = TemplateDate.INSTANCE;
   public static ParserCommons       INSTANCE    = new ParserCommons();
-  public static TemplateNumberUtils getNumberUtils()
-  {
-    return numberUtils;
-  }
-
-  public static Class<?> getClass(String clazz)
-  {
-    return ObjectUtils.throwAsError(() -> Class.forName(clazz));
-  }
-
-  public static Object createNew(String clazz)
-  {
-    return ObjectUtils.throwAsError(() -> getClass(clazz).newInstance());
-  }
-
-  public static Object getNull()
-  {
-    return null;
-  }
-
-  public static ParserDateUtils getDateUtils()
-  {
-    return ParserDateUtils.INSTANCE;
-  }
-
-  public static TemplateStringUtils getStringUtils()
-  {
-    return stringUtils;
-  }
-
-  public static String asJavascript(Object obj)
-  {
-    return TemplateStringUtils.toJavaScriptEncode(obj);
-  }
-
-  public static TemplateDate getToday()
-  {
-    return today;
-  }
-
-  public static TemplateDate asDate(Date date)
-  {
-    return new TemplateDate(date);
-  }
-
-  public static TemplateDouble asDouble(double number)
-  {
-    return new TemplateDouble(number);
-  }
-
-  public static PhoneNumber asPhoneNumber(String number)
-  {
-    return new PhoneNumber(number);
-  }
-
-  public static String asExcel(String text)
-  {
-    return TemplateStringUtils.formatExcelString(text);
-  }
-
-  public static boolean isNull(Object object)
-  {
-    return object == null;
-  }
-
-  public static PercentageAmount asPercentage(double d)
-  {
-    return new PercentageAmount(d);
-  }
-
-  public static TemplateDouble asDouble(Number number)
-  {
-    return new TemplateDouble(number.doubleValue());
-  }
-
-  public static <T> List<Item<T>> asArray(T[] array, int offset, int stepping)
-  {
-    return new VelocityList<T>(array, offset, stepping).getAll();
-  }
-
-  public static <T> List<Item<T>> asArray(T[] array, int offset, int stepping1, int stepping2)
-  {
-    return new VelocityList<T>(array, offset, new int[]{stepping1, stepping2}).getAll();
-  }
-
-  public static List<Item<Object>> asArray(Object nullObject)
-  {
-    if (nullObject != null)
-    {
-      if (nullObject.getClass().isArray())
-      {
-        return asArray((Object[]) nullObject);
-      }
-      else
-      {
-        throw new Error("Improper usage for" + nullObject);
-      }
-    }
-    return new VelocityList<Object>(Collections.emptyList()).getAll();
-  }
-
-  public static <T> List<Item<T>> asArray(List<T> list)
-  {
-    return new VelocityList<T>(list).getAll();
-  }
-
-  public static <T> List<Item<T>> asArray(T[] list)
-  {
-    return new VelocityList<T>(list).getAll();
-  }
-
-  public static <T> List<Item<T>> asArray(List<T> list, int offset, int stepping1, int stepping2)
-  {
-    return new VelocityList<T>(list, offset, new int[]{stepping1, stepping2}).getAll();
-  }
-
-  public static TemplateDouble asDouble(int number)
-  {
-    return new TemplateDouble(number);
-  }
-
-  public static CurrencyAmount asCurrency(double number)
-  {
-    return new CurrencyAmount(number);
-  }
-
-  public static CurrencyAmount asCurrency(Number number)
-  {
-    return number == null ? new CurrencyAmount(0.00) : new CurrencyAmount(number.doubleValue());
-  }
-
-  public static CurrencyAmount asCurrency(int number)
-  {
-    return new CurrencyAmount(number);
-  }
-
-  public static CurrencyAmount asCurrencyAmount(double number)
-  {
-    return new CurrencyAmount(number);
-  }
-
-  public static CurrencyAmount asCurrencyAmount(Number number)
-  {
-    return new CurrencyAmount(number.doubleValue());
-  }
-
-  public static CurrencyAmount asCurrencyAmount(int number)
-  {
-    return new CurrencyAmount(number);
-  }
-
-  public static int getArrayLength(Object[] array)
-  {
-    return array == null ? 0 : array.length;
-  }
-
-  public static int getLength(Object[] array)
-  {
-    return array == null ? 0 : array.length;
-  }
-
-  public static int getLength(Collection<?> collection)
-  {
-    return collection == null ? 0 : collection.size();
-  }
-
-  public static boolean isEmpty(Object[] array)
-  {
-    return getArrayLength(array) == 0;
-  }
-
-  public static boolean isNotEmpty(Object[] array)
-  {
-    return !isEmpty(array);
-  }
-
-  public static boolean isEmpty(List<?> list)
-  {
-    return (list == null || list.size() == 0);
-  }
-
-  public static Object ternary(boolean test, Object ifTrue, Object ifFalse)
-  {
-    return test ? ifTrue : ifFalse;
-  }
-
-  public static Object get(Object[] array, int index)
-  {
-    return getArrayLength(array) > index ? array[index] : null;
-  }
-
-  public static Object get(List<?> list, int index)
-  {
-    return list == null ? null : list.get(index);
-  }
-
-  public static void throwError(String errorString)
-  {
-    throw new Error(errorString);
-  }
-
-  public static void throwError(Throwable t)
-  {
-    throw ObjectUtils.throwAsError(t);
-  }
 }
com/spun/util/logger/SimpleLoggerInstance.java 441 → 231 lines (-210)
@@ -1,16 +1,9 @@
 package com.spun.util.logger;
 
-import com.spun.util.DateDifference;
 import com.spun.util.ObjectUtils;
-import com.spun.util.ThreadUtils;
 
 import java.io.IOException;
 import java.io.PrintStream;
 import java.io.PrintWriter;
-import java.nio.charset.StandardCharsets;
-import java.nio.file.Files;
-import java.nio.file.Paths;
-import java.nio.file.StandardOpenOption;
-import java.text.SimpleDateFormat;
 import java.util.ArrayList;
 import java.util.Date;
@@ -51,12 +44,4 @@ public class SimpleLoggerInstance
   }
 
-  public void toggleAll(boolean t)
-  {
-    marker = t;
-    event = t;
-    variable = t;
-    query = t;
-  }
-
   private void clearHourGlass()
   {
@@ -68,63 +53,4 @@ public class SimpleLoggerInstance
   }
 
-  public void setHourGlassWrap(int numberOfDots)
-  {
-    hourGlassWrap = numberOfDots;
-  }
-
-  public void hourGlass()
-  {
-    if (hourGlassWrap <= hourGlass)
-    {
-      clearHourGlass();
-    }
-    if (hourGlass == 0)
-    {
-      log(timeStampTextOnly());
-    }
-    hourGlass++;
-    String mark = ((hourGlass % 10) == 0) ? ("" + (hourGlass / 10)) : ".";
-    log(mark);
-  }
-
-  public long startTimer()
-  {
-    return System.currentTimeMillis();
-  }
-
-  public void stopTimer(long startTime, long maxTime, String function)
-  {
-    long diff = System.currentTimeMillis() - startTime;
-    if (diff > maxTime)
-    {
-      warning("Time Limit Exceeded - " + function + " [" + new DateDifference(diff).getStandardTimeText(2) + " > "
-          + maxTime + "]");
-    }
-  }
-
-  public void markerIn(String statement)
-  {
-    if (!marker)
-    { return; }
-    logLine(timeStamp() + Symbols.markerIn + statement + " - IN");
-    m_indent++;
-  }
-
-  private String extractMarkerText()
-  {
-    try
-    {
-      StackTraceElement[] trace = ThreadUtils.getStackTrace();
-      StackTraceElement element = trace[4 + wrapperLevels];
-      String className = element.getClassName();
-      className = className.substring(className.lastIndexOf(".") + 1);
-      return className + "." + element.getMethodName() + "()";
-    }
-    catch (Throwable t)
-    {
-      return "Can't Inspect Stack Trace";
-    }
-  }
-
   private String getIndent()
   {
@@ -192,55 +118,5 @@ public class SimpleLoggerInstance
   }
 
-  public synchronized void markerOut(String text)
-  {
-    if (!marker)
-    { return; }
-    m_indent--;
-    logLine(timeStamp() + Symbols.markerOut + text + " - OUT");
-  }
 
-  public synchronized void query(String sqlQuery)
-  {
-    if (!query)
-    { return; }
-    logLine(timeStamp() + Symbols.sql + sqlQuery);
-  }
-
-  /**
-   * Prints to screen any variable information to be viewed.
-   **/
-  public synchronized void query(String queryName, Object sqlQuery)
-  {
-    if (!query)
-    { return; }
-    logLine(timeStamp() + Symbols.sql + "[" + queryName + "] - " + sqlQuery);
-  }
-
-  public void variableFormated(String string, Object... parameters)
-  {
-    variable(String.format(string, parameters));
-  }
-
-  public synchronized void variable(String statement)
-  {
-    if (!variable)
-    { return; }
-    logLine(timeStamp() + Symbols.variable + statement);
-  }
-
-  /**
-   * Prints to screen any variable information to be viewed.
-   **/
-  public synchronized void variable(String name, Object value, boolean showTypes)
-  {
-    if (!variable)
-    { return; }
-    String typeInfo = "";
-    if (showTypes && value != null)
-    {
-      typeInfo = String.format(" <%s>", value.getClass().getSimpleName());
-    }
-    logLine(String.format("%s%s%s = '%s'%s", timeStamp(), Symbols.variable, name, value, typeInfo));
-  }
 
   private void logLine(String text)
@@ -261,25 +137,4 @@ public class SimpleLoggerInstance
   }
 
-  public synchronized void variable(String name, Object[] array)
-  {
-    if (!variable)
-    { return; }
-    name = (name == null ? "array" : name);
-    if (array == null)
-    {
-      array = new Object[0];
-    }
-    logLine(timeStamp() + Symbols.variable + name + ".length = " + array.length);
-    for (int i = 0; i < array.length; i++)
-    {
-      logLine(timeStamp() + name + "[" + i + "] = " + array[i]);
-    }
-  }
-
-  public synchronized <T> void variable(T[] array)
-  {
-    variable(null, array);
-  }
-
   public synchronized void message(String Statement)
   {
@@ -374,68 +229,3 @@ public class SimpleLoggerInstance
   }
 
-  /**
-   * {@code
-   * try (Markers m = SimpleLogger.useMarkers();)
-   * {
-   * }
-   * }
-   */
-  public Markers useMarkers()
-  {
-    final String text = extractMarkerText();
-    return new Markers(this, text);
-  }
-
-  public StringBuffer logToString()
-  {
-    marker = true;
-    event = true;
-    variable = true;
-    query = true;
-    timestamp = false;
-    stacktraces = false;
-    StringBuffer buffer = new StringBuffer();
-    logTo = buffer;
-    return buffer;
-  }
-
-  public void useOutputFile(String file, boolean addDateStamp)
-  {
-    try
-    {
-      logTo = Files.newBufferedWriter(Paths.get(addDatestampToFile(file, addDateStamp)), StandardCharsets.UTF_8,
-          StandardOpenOption.TRUNCATE_EXISTING, StandardOpenOption.CREATE);
-    }
-    catch (IOException e)
-    {
-      throw ObjectUtils.throwAsError(e);
-    }
-  }
-
-  private String addDatestampToFile(String file, boolean addDateStamp)
-  {
-    if (!addDateStamp)
-    { return file; }
-    String date = ".[" + new SimpleDateFormat("yyyy_MM_dd").format(new Date()) + "]";
-    int seperator = file.lastIndexOf('.');
-    if (0 < seperator)
-    {
-      file = file.substring(0, seperator) + date + file.substring(seperator);
-    }
-    else
-    {
-      file += System.currentTimeMillis() + ".log";
-    }
-    return file;
-  }
-
-  public void logTo(Appendable writer)
-  {
-    logTo = writer;
-  }
-
-  public Appendable getLogTo()
-  {
-    return logTo;
-  }
 }
com/spun/util/tests/TestUtils.java 231 → 69 lines (-162)
@@ -2,20 +2,11 @@ package com.spun.util.tests;
 
 import com.spun.util.ClassUtils;
-import com.spun.util.FormattedException;
 import com.spun.util.ObjectUtils;
 import com.spun.util.ThreadUtils;
-import com.spun.util.WindowUtils;
-import com.spun.util.images.ImageWriter;
-import com.spun.util.io.FileUtils;
-import com.spun.util.io.StackElementLevelSelector;
 import com.spun.util.io.StackElementSelector;
 import org.lambda.functions.Function2;
 import org.lambda.query.Queryable;
 
-import javax.swing.JFileChooser;
-import javax.swing.JFrame;
-import java.awt.image.BufferedImage;
 import java.io.File;
-import java.io.FileOutputStream;
 import java.util.List;
 import java.util.Random;
@@ -28,159 +19,6 @@ public class TestUtils
   private static final ThreadLocal<Function2<Class, String, File>> getSourceDirectory = ThreadLocal
       .withInitial(() -> ClassUtils::getSourceDirectory);
-  public static SourceDirectoryRestorer registerSourceDirectoryFinder(
-      Function2<Class, String, File> sourceDirectoryFinder)
-  {
-    SourceDirectoryRestorer c = new SourceDirectoryRestorer();
-    TestUtils.getSourceDirectory.set(sourceDirectoryFinder);
-    return c;
-  }
-  public static class SourceDirectoryRestorer implements AutoCloseable
-  {
-    private final Function2<Class, String, File> original;
-    public SourceDirectoryRestorer()
-    {
-      this.original = TestUtils.getSourceDirectory.get();
-    }
-
-    @Override
-    public void close()
-    {
-      TestUtils.getSourceDirectory.set(original);
-    }
-  }
-  public static File getFile(String startingDir)
-  {
-    JFrame frame = new JFrame();
-    WindowUtils.testFrame(frame, false);
-    JFileChooser chooser = new JFileChooser();
-    chooser.setCurrentDirectory(new File(startingDir));
-    int returnVal = chooser.showOpenDialog(frame);
-    File returning = null;
-    if (returnVal == JFileChooser.APPROVE_OPTION)
-    {
-      returning = chooser.getSelectedFile();
-    }
-    frame.dispose();
-    return returning;
-  }
-
-  public static void displayXml(String htmlOutput)
-  {
-    try
-    {
-      displayHtml(null, ".xml", htmlOutput, 3);
-    }
-    catch (Exception e)
-    {
-      throw ObjectUtils.throwAsError(e);
-    }
-  }
-
-  public static String getRandomString()
-  {
-    if (random == null)
-    {
-      random = new Random();
-    }
-    return Long.toString(Math.abs(random.nextLong()), 36);
-  }
-
-  public static void displayHtml(String htmlOutput)
-  {
-    displayHtml(null, ".html", htmlOutput, 3);
-  }
-
-  public static void displayHtmlFile(String fileName)
-  {
-    displayFile(fileName);
-  }
-
-  public static void displayHtmlFile(File file)
-  {
-    if (!file.exists())
-    { return; }
-    displayHtmlFile(file.getAbsolutePath());
-  }
-
-  public static void displayHtml(String outputFile, String htmlOutput)
-  {
-    displayHtml(outputFile, ".html", htmlOutput, 15);
-  }
-
-  public static void displayHtml(String outputFile, String fileExtention, String htmlOutput, int secondsTimeout)
-  {
-    try
-    {
-      File file = (outputFile == null) ? File.createTempFile("temp", fileExtention) : new File(outputFile);
-      FileUtils.writeFile(file, htmlOutput);
-      displayHtmlFile(file);
-      Thread.sleep(secondsTimeout * 1000);
-      if (outputFile == null)
-      {
-        file.deleteOnExit();
-      }
-    }
-    catch (Exception e)
-    {
-      throw ObjectUtils.throwAsError(e);
-    }
-  }
-
-  public static void displayText(String output)
-  {
-    displayHtml(null, ".txt", output, 3);
-  }
-
-  public static void displayExcel(String output)
-  {
-    displayHtml(null, ".csv", output, 3);
-    //    Runtime.getRuntime().exec("notepad.exe " + outputFile);
-  }
   private static final List<Opener> openers = Queryable.as(new MacOpener(), new WindowsOpener(),
       new LinuxOpener());
-  public static void registerOpener(Opener opener)
-  {
-    openers.add(0, opener);
-  }
-
-  public static void displayFile(String fileName)
-  {
-    for (Opener opener : openers)
-    {
-      if (opener.open(fileName))
-      { return; }
-    }
-    throw new FormattedException("No match found for your OS.\n"
-        + "Please add your details at https://github.com/approvals/ApprovalTests.Java/issues/251\n"
-        + "In the meantime, call TestUtils.registerOpener(yourCustomOpener).");
-  }
-
-  public static double getTimerMultiplier()
-  {
-    long start = System.currentTimeMillis();
-    ThreadUtils.sleep(500);
-    long end = System.currentTimeMillis();
-    return (end - start) / 500.00;
-  }
-
-  public static void displayImage(BufferedImage image)
-  {
-    try
-    {
-      File f = File.createTempFile("temp", ".gif");
-      ImageWriter.writeImage(image, new FileOutputStream(f), ImageWriter.Encoding.GIF);
-      Runtime.getRuntime().exec("C:\\PROGRA~1\\MOZILL~1\\FIREFOX.EXE " + f.getAbsolutePath());
-    }
-    catch (Exception e)
-    {
-      throw ObjectUtils.throwAsError(e);
-    }
-  }
-
-  public static StackTraceReflectionResult getCurrentFileForMethod(int ignoreLevels)
-  {
-    return getCurrentFileForMethod(new StackElementLevelSelector(ignoreLevels + 2));
-  }
-
   public static StackTraceReflectionResult getCurrentFileForMethod(StackElementSelector stackElementSelector)
   {
com/spun/util/ObjectUtils.java 245 → 98 lines (-147)
@@ -1,12 +1,6 @@
 package com.spun.util;
 
-import org.lambda.actions.Action0;
 import org.lambda.actions.Action0WithException;
 import org.lambda.functions.Function0WithException;
-import org.lambda.query.Query;
-
-import java.lang.reflect.Method;
-import java.util.ArrayList;
-import java.util.List;
 
 /**
@@ -20,51 +14,4 @@ public class ObjectUtils
   }
 
-  public static int generateHashCode(Object... relevantMembers)
-  {
-    final int PRIME = 31;
-    int result = 1;
-    for (Object member : relevantMembers)
-    {
-      result = PRIME * result + ((member == null) ? 0 : member.hashCode());
-    }
-    return result;
-  }
-
-  /**
-   * tests if two objects are equal for all functions passed.
-   **/
-  public static boolean isEqualForMethods(Object o1, Object o2, String... methods)
-  {
-    try
-    {
-      Method[] m1 = getMethodsForObject(o1, methods);
-      Method[] m2 = getMethodsForObject(o2, methods);
-      for (int i = 0; i < m1.length; i++)
-      {
-        Object v1 = m1[i].invoke(o1, (Object[]) null);
-        Object v2 = m2[i].invoke(o2, (Object[]) null);
-        if (!isEqual(v1, v2))
-        { return false; }
-      }
-      return true;
-    }
-    catch (Throwable t)
-    {
-      throw new Error(t);
-    }
-  }
-
-  public static Method[] getMethodsForObject(Object o2, String[] passedMethods)
-  {
-    Method[] methods = new Method[passedMethods.length];
-    Class<?> clazz = o2.getClass();
-    for (int i = 0; i < passedMethods.length; i++)
-    {
-      String methodName = passedMethods[i];
-      Class[] parameters = null;
-      methods[i] = throwAsError(() -> clazz.getMethod(methodName, parameters));
-    }
-    return methods;
-  }
 
   /**
@@ -87,14 +34,4 @@ public class ObjectUtils
   }
 
-  public static boolean isIn(Object target, Object[] objects)
-  {
-    for (int i = 0; i < objects.length; i++)
-    {
-      if (ObjectUtils.isEqual(objects[i], target))
-      { return true; }
-    }
-    return false;
-  }
-
   public static boolean isThisInstanceOfThat(Class<?> thiz, Class<?> that)
   {
@@ -118,67 +55,4 @@ public class ObjectUtils
   }
 
-  public static <T> T getRandomIndex(T[] array)
-  {
-    if ((array == null) || (array.length == 0))
-    { return null; }
-    return array[NumberUtils.RANDOM.nextInt(array.length)];
-  }
-
-  public static Method getGreatestCommonDenominator(Object[] from, String methodName)
-  {
-    List<Class<?>> classes = new ArrayList<>();
-    ArrayUtils.addArray(classes, getAllCastableClasses(from[0]));
-    for (Object o : from)
-    {
-      for (int i = classes.size() - 1; i >= 0; i--)
-      {
-        Class<?> clazz = classes.get(i);
-        if (!isThisInstanceOfThat(o.getClass(), clazz) || !ClassUtils.hasMethod(clazz, methodName))
-        {
-          classes.remove(i);
-        }
-      }
-    }
-    return classes.size() == 0
-        ? null
-        : throwAsError(() -> ArrayUtils.getLast(classes).getMethod(methodName, (Class[]) null));
-  }
-
-  private static Class<?>[] getAllCastableClasses(Object object)
-  {
-    Class<? extends Object> clazz = object.getClass();
-    ArrayList<Object> list = new ArrayList<Object>();
-    while (clazz != null)
-    {
-      list.add(clazz);
-      ArrayUtils.addArray(list, clazz.getInterfaces());
-      clazz = clazz.getSuperclass();
-    }
-    Class<?>[] found = list.toArray(new Class<?>[list.size()]);
-    ArrayUtils.toReverseArray(found);
-    return found;
-  }
-
-  public static void assertInstance(Class<?> clazz, Object object)
-  {
-    assertInstance(new Class[]{clazz}, object);
-  }
-
-  public static void assertInstance(Class<?>[] classes, Object object)
-  {
-    if (object == null)
-    {
-      throw new NullPointerException(
-          "Expected Object of Type " + Query.select(classes, Class::getName) + " but was null");
-    }
-    for (int i = 0; i < classes.length; i++)
-    {
-      if (ClassUtils.getWrapperClass(classes[i]).isInstance(object))
-      { return; }
-    }
-    throw new IllegalArgumentException("Expected Object of Type " + Query.select(classes, Class::getName)
-        + " but got " + object.getClass().getName());
-  }
-
   public static String getClassName(Object o)
   {
@@ -186,12 +60,4 @@ public class ObjectUtils
   }
 
-  public static void assertInstanceOrNull(Class<?> type, Object value)
-  {
-    if (value != null)
-    {
-      assertInstance(type, value);
-    }
-  }
-
   public static boolean isClassPresent(String className)
   {
@@ -207,17 +73,4 @@ public class ObjectUtils
   }
 
-  public static Throwable captureException(Action0 runnableBlock)
-  {
-    try
-    {
-      runnableBlock.call();
-    }
-    catch (Throwable t)
-    {
-      return t;
-    }
-    return null;
-  }
-
   public static <T> T throwAsError(Function0WithException<T> code)
   {
com/spun/util/logger/SimpleLogger.java 181 → 34 lines (-147)
@@ -1,7 +1,5 @@
 package com.spun.util.logger;
 
-import com.spun.util.QuietAutoCloseable;
 import com.spun.util.SingleWrapper;
-import com.spun.util.ThreadedWrapper;
 import com.spun.util.Wrapper;
 
@@ -9,78 +7,7 @@ public class SimpleLogger
 {
   private static Wrapper<SimpleLoggerInstance> wrapper = new SingleWrapper<>(new SimpleLoggerInstance(1));
-  public static void toggleAll(boolean t)
-  {
-    wrapper.get().toggleAll(t);
-  }
-
-  public static void setHourGlassWrap(int numberOfDots)
-  {
-    wrapper.get().setHourGlassWrap(numberOfDots);
-  }
-
-  public static void hourGlass()
-  {
-    wrapper.get().hourGlass();
-  }
-
-  @Deprecated
-  //use useMarkers
-  public static void markerIn(String statement)
-  {
-    wrapper.get().markerIn(statement);
-  }
-
-  @Deprecated
-  //use useMarkers
-  public synchronized static void markerOut(String text)
-  {
-    wrapper.get().markerOut(text);
-  }
-
-  public synchronized static void query(String sqlQuery)
-  {
-    wrapper.get().query(sqlQuery);
-  }
-
-  /**
-   * Prints to screen any variable information to be viewed.
-   **/
-  public synchronized static void query(String queryName, Object sqlQuery)
-  {
-    wrapper.get().query(queryName, sqlQuery);
-  }
-
-  public static void variableFormated(String string, Object... parameters)
-  {
-    wrapper.get().variableFormated(string, parameters);
-  }
-
-  public synchronized static void variable(String statement)
-  {
-    wrapper.get().variable(statement);
-  }
-
-  public static void variable(String name, Object value, boolean showTypes)
-  {
-    wrapper.get().variable(name, value, showTypes);
-  }
-
   /**
    * Prints to screen any variable information to be viewed.
    **/
-  public synchronized static void variable(String name, Object value)
-  {
-    variable(name, value, false);
-  }
-
-  public synchronized static void variable(String name, Object[] array)
-  {
-    wrapper.get().variable(name, array);
-  }
-
-  public synchronized static <T> void variable(T[] array)
-  {
-    wrapper.get().variable(array);
-  }
 
   public synchronized static void message(String Statement)
@@ -94,9 +21,4 @@ public class SimpleLogger
   }
 
-  public synchronized static void warning(String statement)
-  {
-    wrapper.get().warning(statement);
-  }
-
   public synchronized static void warning(Throwable throwable)
   {
@@ -109,73 +31,4 @@ public class SimpleLogger
   }
 
-  /**
-   * Logs the current memory status [total, used, free].
-   * This forces garbage collection to run first.
-   **/
-  public static void logMemoryStatus()
-  {
-    wrapper.get().logMemoryStatus();
-  }
 
-  /**
-   * {@code
-   * try (Markers m = SimpleLogger.useMarkers();)
-   * {
-   * }
-   * }
-   */
-  public static Markers useMarkers()
-  {
-    return wrapper.get().useMarkers();
-  }
-
-  public static StringBuffer logToString()
-  {
-    return logToString(true);
-  }
-
-  public static StringBuffer logToString(boolean threadSafe)
-  {
-    synchronized (SimpleLogger.wrapper)
-    {
-      if (threadSafe && !(wrapper instanceof ThreadedWrapper))
-      {
-        wrapper = new ThreadedWrapper<>(() -> new SimpleLoggerInstance(1));
-      }
-      return wrapper.get().logToString();
-    }
-  }
-
-  public static Appendable logToNothing()
-  {
-    return logTo(new NullLogger());
-  }
-
-  public static void useOutputFile(String file, boolean addDateStamp)
-  {
-    wrapper.get().useOutputFile(file, addDateStamp);
-  }
-
-  public static Appendable logTo(Appendable writer)
-  {
-    wrapper.get().logTo(writer);
-    return writer;
-  }
-
-  public static Appendable getLogTo()
-  {
-    return wrapper.get().getLogTo();
-  }
-
-  public static SimpleLoggerInstance get()
-  {
-    return wrapper.get();
-  }
-
-  public static QuietAutoCloseable quiet()
-  {
-    Appendable originalLogTo = getLogTo();
-    logToNothing();
-    return () -> logTo(originalLogTo);
-  }
 }
com/spun/util/parser/TemplateStringUtils.java 155 → 18 lines (-137)
@@ -1,5 +1,4 @@
 package com.spun.util.parser;
 
-import com.spun.util.StringUtils;
 
 import java.io.File;
@@ -12,70 +11,4 @@ public class TemplateStringUtils
   }
 
-  public String truncate(String onString, int maxLength)
-  {
-    return truncate(onString, maxLength, new String[]{});
-  }
-
-  public String plural(int number, String singular, String plural)
-  {
-    return String.format("%s %s", number, (number == 1 ? singular : plural));
-  }
-
-  public String truncate(String onString, int maxLength, String minus1, String minus2)
-  {
-    return truncate(onString, maxLength, new String[]{"", "", minus1, minus2});
-  }
-
-  public String truncate(String onString, int maxLength, String minus1)
-  {
-    return truncate(onString, maxLength, new String[]{"", "", minus1});
-  }
-
-  private String truncate(String onString, int maxLength, String[] minus)
-  {
-    if (onString == null || onString.equals("null"))
-    { return ""; }
-    for (int i = 2; i < minus.length; i++)
-    {
-      maxLength -= minus[i] != null ? minus[i].length() : 0;
-    }
-    maxLength = (maxLength < 0) ? 0 : maxLength;
-    return StringUtils.truncate(onString, maxLength);
-  }
-
-  public static String clearNull(String value)
-  {
-    return clearNull(value, "");
-  }
-
-  public static String clearNull(Object value, String replacingValue)
-  {
-    return (("null".equals(value) || value == null) ? replacingValue : value.toString());
-  }
-
-  /**
-   * Compare if arg [0] equals any other argument starting at [1].
-   **/
-  public static boolean isIn(String compare, String inParameter1, String inParameter2)
-  {
-    return StringUtils.isIn(compare, new String[]{inParameter1, inParameter2});
-  }
-
-  public static boolean isIn(String compare, String inParameter1)
-  {
-    return StringUtils.isIn(compare, new String[]{inParameter1});
-  }
-
-  public static String pad(String original, int length, String paddingCharacter)
-  {
-    original = original == null ? "" : original;
-    int paddingNeeded = length - original.length();
-    StringBuffer buffer = new StringBuffer(original);
-    for (int i = 0; i < paddingNeeded; i++)
-    {
-      buffer.append(paddingCharacter);
-    }
-    return buffer.toString();
-  }
 
   public String getFileName(String fileName)
@@ -83,73 +16,3 @@ public class TemplateStringUtils
     return fileName.substring(fileName.lastIndexOf(File.separatorChar) + 1);
   }
-
-  public static String formatExcelString(String in)
-  {
-    if ("0".equals(in) || "null".equals(in) || in == null) // So that null's & int(0) show up empty
-    {
-      return "\"\"";
-    }
-    else if (in.indexOf('\"') == -1)
-    {
-      return '\"' + in + '\"';
-    }
-    else
-    {
-      StringBuffer buffer = new StringBuffer();
-      buffer.append('\"');
-      for (int i = 0; i < in.length(); i++)
-      {
-        char c = in.charAt(i);
-        buffer.append((c == '\"') ? "\"\"" : "" + c);
-      }
-      buffer.append('\"');
-      return buffer.toString();
-    }
-  }
-
-  public static int getLength(String s)
-  {
-    return s == null ? 0 : s.length();
-  }
-
-  public String toHTMLEncode(String string)
-  {
-    return StringUtils.toHTMLEncode(clearNull(string));
-  }
-
-  public String toURLEncode(String string)
-  {
-    return StringUtils.toURLEncode(clearNull(string));
-  }
-
-  public static String toJavaScriptEncode(String string)
-  {
-    return StringUtils.toJavaScriptEncode(clearNull(string, null));
-  }
-
-  public static String toJavaScriptEncode(Number n)
-  {
-    return n == null ? "null" : n.toString();
-  }
-
-  public static String toJavaScriptEncode(Object n)
-  {
-    if (n == null)
-    {
-      return "null";
-    }
-    else if (n instanceof Number)
-    {
-      return toJavaScriptEncode((Number) n);
-    }
-    else
-    {
-      return toJavaScriptEncode(n.toString());
-    }
-  }
-
-  public static String asXml(String s)
-  {
-    return StringUtils.escapeForXml(s);
-  }
 }
org/lambda/query/Query.java 436 → 318 lines (-118)
@@ -40,19 +40,4 @@ public class Query<In>
   }
 
-  public static <In> In first(Iterable<In> iterable)
-  {
-    return first(iterable, __ -> true);
-  }
-
-  public static <In> In first(In[] list)
-  {
-    return first(list, __ -> true);
-  }
-
-  public static <In> In first(In[] list, Function1<In, Boolean> filter)
-  {
-    return first(ArrayUtils.asList(list), filter);
-  }
-
   public static <In> In first(Iterable<In> list, Function1<In, Boolean> filter)
   {
@@ -65,10 +50,4 @@ public class Query<In>
   }
 
-  public static <In, E extends Throwable> In firstOrThrow(In[] list, Function1<In, Boolean> filter,
-      Function0<E> exception) throws E
-  {
-    return firstOrThrow(Arrays.asList(list), filter, exception);
-  }
-
   public static <In, E extends Throwable> In firstOrThrow(Iterable<In> list, Function1<In, Boolean> filter,
       Function0<E> exception) throws E
@@ -113,9 +92,4 @@ public class Query<In>
   }
 
-  public static <In> Double average(In[] array, Function1<In, Number> f1)
-  {
-    return average(Arrays.asList(array), f1);
-  }
-
   public static <In> Double average(Iterable<In> list, Function1<In, Number> f1)
   {
@@ -152,15 +126,4 @@ public class Query<In>
   }
 
-  public static <T, Out extends Comparable<Out>> T[] orderBy(T[] list, Function1<T, Out> f1)
-  {
-    return orderBy(list, Order.Ascending, f1);
-  }
-
-  public static <T, Out extends Comparable<Out>> T[] orderBy(T[] list, Order order, Function1<T, Out> f1)
-  {
-    Arrays.sort(list, new OrderBy<T, Out>(order, f1));
-    return list;
-  }
-
   public static <T> Queryable<T> orderBy(List<T> list, Function1<T, Comparable<?>> f1)
   {
@@ -203,16 +166,4 @@ public class Query<In>
   }
 
-  /**
-   * <H1>Why does sum() return double?</H1><br>
-   * sum() needs to handle possible overflow.<br>
-   * For example:<br>
-   * <code>Queryable.as(100, 100, 100).sum(n -&gt; n.byteValue())</code> should equal 300.<br>
-   * Because Double handles the largest range of any number, that is what is returned by default. You can convert
-   * it to whichever type you want, but be aware that overflowed values may be truncated.
-   */
-  public static <Out extends Number> Double sum(Out[] list)
-  {
-    return sum(list, a -> a);
-  }
 
   @SuppressWarnings({"rawtypes", "unchecked"})
@@ -222,15 +173,4 @@ public class Query<In>
   }
 
-  public static <In extends Number> In max(In[] numbers)
-  {
-    return max(ArrayUtils.asList(numbers));
-  }
-
-  @SuppressWarnings({"rawtypes", "unchecked"})
-  public static <In extends Number> In min(In[] numbers)
-  {
-    return min(Arrays.asList(numbers));
-  }
-
   @SuppressWarnings({"rawtypes", "unchecked"})
   public static <In extends Number> In min(Iterable<In> numbers)
@@ -239,9 +179,4 @@ public class Query<In>
   }
 
-  public static <In> boolean all(In[] array, Function1<In, Boolean> funct)
-  {
-    return array.length == where(array, funct).size();
-  }
-
   public static <In> boolean all(Iterable<In> array, Function1<In, Boolean> funct)
   {
@@ -254,14 +189,4 @@ public class Query<In>
   }
 
-  public static <In> boolean any(In[] array, Function1<In, Boolean> funct)
-  {
-    return first(array, funct) != null;
-  }
-
-  public static <In> Queryable<In> distinct(In[] array)
-  {
-    return distinct(Arrays.asList(array));
-  }
-
   public static <In> Queryable<In> distinct(Iterable<In> list)
   {
@@ -277,9 +202,4 @@ public class Query<In>
   }
 
-  public static <In> In last(In[] list)
-  {
-    return last(Arrays.asList(list));
-  }
-
   static <In> In last(Iterable<In> asList)
   {
@@ -287,9 +207,4 @@ public class Query<In>
   }
 
-  public static <Out, In> Queryable<Out> selectMany(In[] array, Function1<In, Collection<Out>> selector)
-  {
-    return selectMany(Arrays.asList(array), selector);
-  }
-
   public static <Out, In> Queryable<Out> selectMany(Iterable<In> list, Function1<In, Collection<Out>> selector)
   {
@@ -302,9 +217,4 @@ public class Query<In>
   }
 
-  public static <Out, In> Queryable<Out> selectManyArray(In[] array, Function1<In, Out[]> selector)
-  {
-    return selectManyArray(Arrays.asList(array), selector);
-  }
-
   public static <Out, In> Queryable<Out> selectManyArray(Iterable<In> list, Function1<In, Out[]> selector)
   {
@@ -317,10 +227,4 @@ public class Query<In>
   }
 
-  public static <Key, In> Queryable<Map.Entry<Key, Queryable<In>>> groupBy(In[] array,
-      Function1<In, Key> keySelector)
-  {
-    return groupBy(Arrays.asList(array), keySelector);
-  }
-
   public static <Key, In> Queryable<Map.Entry<Key, Queryable<In>>> groupBy(Iterable<In> list,
       Function1<In, Key> keySelector)
@@ -376,12 +280,4 @@ public class Query<In>
   }
 
-  public static <In> Queryable<In> skip(In[] list, int number)
-  {
-    if (list == null || list.length <= number)
-    { return Queryable.createEmpty(list); }
-    In[] ins = Arrays.copyOfRange(list, number, list.length);
-    return Queryable.as(ins);
-  }
-
   public static <In> Queryable<In> take(Iterable<In> list, int number)
   {
@@ -405,18 +301,4 @@ public class Query<In>
   }
 
-  public static <In> Queryable<In> take(In[] list, int number)
-  {
-    if (list == null)
-    { return new Queryable<>(); }
-    In[] ins = Arrays.copyOfRange(list, 0, Math.min(number, list.length));
-    return Queryable.as(ins);
-  }
-
-  public static <In> Queryable<In> selectRecursivelyUntil(In[] array, Function1<In, In> selector,
-      Function1<In, Boolean> until)
-  {
-    return selectRecursivelyUntil(Queryable.as(array), selector, until);
-  }
-
   public static <In> Queryable<In> selectRecursivelyUntil(List<In> list, Function1<In, In> selector,
       Function1<In, Boolean> until)
com/spun/util/ClassUtils.java 274 → 173 lines (-101)
@@ -8,7 +8,4 @@ import org.lambda.query.Queryable;
 
 import java.io.File;
-import java.lang.reflect.Field;
-import java.lang.reflect.Method;
-import java.lang.reflect.Modifier;
 import java.util.ArrayList;
 import java.util.Arrays;
@@ -19,74 +16,4 @@ public class ClassUtils
 {
   public static final String APPROVALTESTS_PROJECT_DIRECTORY = "APPROVALTESTS_PROJECT_DIRECTORY";
-  public static String getClassName(Class<?> clazz)
-  {
-    String name = clazz.getName();
-    int divider = name.lastIndexOf(".");
-    return name.substring(divider + 1);
-  }
-
-  public static String getClassPath(Class<?> clazz)
-  {
-    String name = clazz.getName();
-    int divider = name.lastIndexOf(".");
-    return name.substring(0, divider);
-  }
-
-  public static Class<?> getWrapperClass(Class<?> primativeType)
-  {
-    if (boolean.class.equals(primativeType))
-    {
-      return Boolean.class;
-    }
-    else if (float.class.equals(primativeType))
-    {
-      return Float.class;
-    }
-    else if (long.class.equals(primativeType))
-    {
-      return Long.class;
-    }
-    else if (int.class.equals(primativeType))
-    {
-      return Integer.class;
-    }
-    else if (short.class.equals(primativeType))
-    {
-      return Short.class;
-    }
-    else if (byte.class.equals(primativeType))
-    {
-      return Byte.class;
-    }
-    else if (double.class.equals(primativeType))
-    {
-      return Double.class;
-    }
-    else if (char.class.equals(primativeType))
-    {
-      return Character.class;
-    }
-    else
-    {
-      return primativeType;
-    }
-  }
-
-  public static boolean hasMethod(Class<?> clazz, String methodName, Class<?>... parameterTypes)
-  {
-    try
-    {
-      return clazz.getMethod(methodName, parameterTypes) != null;
-    }
-    catch (SecurityException e)
-    {
-      throw ObjectUtils.throwAsError(e);
-    }
-    catch (NoSuchMethodException e)
-    {
-      return false;
-    }
-  }
-
   public static File getSourceDirectory(Class<?> clazz)
   {
@@ -201,27 +128,4 @@ public class ClassUtils
   }
 
-  public static boolean IsPublicStatic(Field field)
-  {
-    return field != null && Modifier.isPublic(field.getModifiers()) && Modifier.isStatic(field.getModifiers());
-  }
-
-  public static boolean isPrimitiveField(Field field)
-  {
-    return field != null && (field.getType().isArray() || field.getType().isPrimitive()
-        || field.getType().isAssignableFrom(String.class));
-  }
-
-  public static Method getMethod(Class<?> clazz, String methodName)
-  {
-    try
-    {
-      return clazz.getMethod(methodName, (Class[]) null);
-    }
-    catch (NoSuchMethodException | SecurityException e)
-    {
-      throw ObjectUtils.throwAsError(e);
-    }
-  }
-
   public static <T> Class<?> getGreatestCommonBaseType(List<T> list)
   {
@@ -267,8 +171,3 @@ public class ClassUtils
     return first;
   }
-
-  public static File getAdjacentFile(Class<?> aClass, String relativeFileName)
-  {
-    return new File(getSourceDirectory(aClass), relativeFileName);
-  }
 }
com/spun/util/JsonUtils.java 187 → 86 lines (-101)
@@ -3,9 +3,4 @@ package com.spun.util;
 import com.google.gson.Gson;
 import com.google.gson.GsonBuilder;
-import com.google.gson.JsonArray;
-import com.google.gson.JsonElement;
-import com.google.gson.JsonObject;
-import com.google.gson.JsonParser;
-import com.google.gson.JsonSyntaxException;
 import com.google.gson.TypeAdapter;
 import com.google.gson.stream.JsonReader;
@@ -16,34 +11,6 @@ import java.io.IOException;
 import java.time.Instant;
 import java.time.LocalDateTime;
-import java.util.Map;
-import java.util.TreeMap;
-import java.util.stream.Collectors;
-
 public class JsonUtils
 {
-  public static String prettyPrint(String json)
-  {
-    return prettyPrint(json, g -> g);
-  }
-
-  public static String prettyPrint(String json, Function1<GsonBuilder, GsonBuilder> gsonBuilder)
-  {
-    if (!ObjectUtils.isClassPresent("com.google.gson.Gson"))
-    {
-      throw new RuntimeException(
-          "Missing Gson dependency\n  Pretty print uses Gson parser.\n  You can get this from the maven repo \n  or https://github.com/google/gson");
-    }
-    try
-    {
-      Gson gson = gsonBuilder.call(new GsonBuilder()).setPrettyPrinting().create();
-      JsonElement je = JsonParser.parseString(json);
-      return gson.toJson(je);
-    }
-    catch (JsonSyntaxException e)
-    {
-      return String.format("Error:%s\nJson:\n%s", e.getMessage(), json);
-    }
-  }
-
   public static String asJson(Object o)
   {
@@ -51,11 +18,4 @@ public class JsonUtils
   }
 
-  public static <T> String asJsonWithBuilder(Object o, Function1<T, T> gsonBuilder, Class<T> gsonBuilderClass)
-  {
-    if (!ObjectUtils.isThisInstanceOfThat(gsonBuilderClass, com.google.gson.GsonBuilder.class))
-    { throw new FormattedException("Class must be of type %s", GsonBuilder.class.getName()); }
-    return asJson(o, (Function1<GsonBuilder, GsonBuilder>) gsonBuilder);
-  }
-
   public static <T> String asJson(Object o, Function1<GsonBuilder, GsonBuilder> gsonBuilder)
   {
@@ -82,65 +42,4 @@ public class JsonUtils
   }
 
-  public static String reorderFields(String json)
-  {
-    return reorderFields(json, g -> g);
-  }
-
-  public static String reorderFields(String json, Function1<GsonBuilder, GsonBuilder> gsonBuilder)
-  {
-    JsonObject sortedJsonObject = sortJsonObject(json);
-    return asJson(sortedJsonObject, gsonBuilder);
-  }
-
-  public static JsonObject sortJsonObject(String json)
-  {
-    JsonObject jsonObject = JsonParser.parseString(json).getAsJsonObject();
-    return sortJsonObjectFields(jsonObject);
-  }
-
-  public static JsonObject sortJsonObjectFields(JsonObject jsonObject)
-  {
-    JsonObject sortedJsonObject = new JsonObject();
-    Map<String, JsonElement> sortedFirstLevelFields = jsonObject.entrySet().stream()
-        .collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue, (a, b) -> b, TreeMap::new));
-    for (Map.Entry<String, JsonElement> entry : sortedFirstLevelFields.entrySet())
-    {
-      JsonElement element = entry.getValue();
-      if (element.isJsonObject())
-      {
-        sortedJsonObject.add(entry.getKey(), sortJsonObjectFields(element.getAsJsonObject()));
-      }
-      else if (element.isJsonArray())
-      {
-        sortedJsonObject.add(entry.getKey(), sortJsonArrayFields(element.getAsJsonArray()));
-      }
-      else
-      {
-        sortedJsonObject.add(entry.getKey(), element);
-      }
-    }
-    return sortedJsonObject;
-  }
-
-  public static JsonArray sortJsonArrayFields(JsonArray jsonArray)
-  {
-    JsonArray sortedJsonArray = new JsonArray();
-    for (JsonElement element : jsonArray)
-    {
-      if (element.isJsonObject())
-      {
-        sortedJsonArray.add(sortJsonObjectFields(element.getAsJsonObject()));
-      }
-      else if (element.isJsonArray())
-      {
-        sortedJsonArray.add(sortJsonArrayFields(element.getAsJsonArray()));
-      }
-      else
-      {
-        sortedJsonArray.add(element);
-      }
-    }
-    return sortedJsonArray;
-  }
   public static class InstantAdapter extends TypeAdapter<Instant>
   {
com/spun/util/parser/TemplateNumberUtils.java 105 → 9 lines (-96)
@@ -1,7 +1,4 @@
 package com.spun.util.parser;
 
-import com.spun.util.NumberUtils;
-import org.lambda.query.Query;
-
 public class TemplateNumberUtils
 {
@@ -10,96 +7,3 @@ public class TemplateNumberUtils
   {
   }
-
-  public static boolean isZero(double d)
-  {
-    return isZero(d, 0.005);
-  }
-
-  public static boolean isZero(Number d)
-  {
-    return d == null || isZero(d.doubleValue(), 0.005);
-  }
-
-  public static int asInt(Number d)
-  {
-    return d == null ? 0 : d.intValue();
-  }
-
-  public static boolean isZero(double d, double delta)
-  {
-    return NumberUtils.equals(0, d, delta);
-  }
-
-  private int getScaling(double have, double max, double scale)
-  {
-    if (max == 0)
-    {
-      throw new Error("Maximum cannot be zero");
-    }
-    else
-    {
-      return (int) ((have * scale) / max);
-    }
-  }
-
-  public int getScaling(Integer have, Integer max, Integer scale)
-  {
-    return getScaling(have.doubleValue(), max.doubleValue(), scale.doubleValue());
-  }
-
-  public static double doArithmetic(int arg1, String operation, int arg2)
-  {
-    return doArithmetic(new String[]{"" + arg1, operation, "" + arg2});
-  }
-
-  public static double doArithmetic(String[] params)
-  {
-    if (params == null || params.length == 0)
-    { return 0.00; }
-    double totalNumber = 0;
-    double currentNumber = 0;
-    char operator = '+';
-    for (int i = 0; i < params.length; i++)
-    {
-      if (i % 2 == 0)
-      {
-        currentNumber = NumberUtils.load(params[i], 0.00);
-        switch (operator)
-        {
-          case '+' :
-            totalNumber = totalNumber + currentNumber;
-            break;
-          case '-' :
-            totalNumber = totalNumber - currentNumber;
-            break;
-          case '*' :
-            totalNumber = totalNumber * currentNumber;
-            break;
-          case '/' :
-            totalNumber = totalNumber / currentNumber;
-            break;
-          case '%' :
-            totalNumber = totalNumber % currentNumber;
-            break;
-          default :
-            throw new Error("Unknown arithmetic operator " + operator);
-        }
-      }
-      else
-      {
-        operator = params[i].charAt(0);
-      }
-    }
-    return totalNumber;
-  }
-
-  public static TemplateDouble max(Number... numbers)
-  {
-    return new TemplateDouble(Query.max(numbers));
-  }
-
-  public static TemplateDouble max(Number n1, Number n2, Number n3)
-  {
-    return max(new Number[]{n1, n2, n3});
-  }
 }
com/spun/util/velocity/VelocityParser.java 172 → 90 lines (-82)
@@ -1,7 +1,5 @@
 package com.spun.util.velocity;
 
-import com.spun.util.Asserts;
 import com.spun.util.ObjectUtils;
-import com.spun.util.io.FileUtils;
 import com.spun.util.parser.ParserCommons;
 import org.apache.velocity.Template;
@@ -9,7 +7,5 @@ import org.apache.velocity.VelocityContext;
 import org.apache.velocity.app.VelocityEngine;
 import org.apache.velocity.context.Context;
-import org.apache.velocity.runtime.RuntimeConstants;
 
-import java.io.File;
 import java.io.StringWriter;
 import java.io.Writer;
@@ -19,34 +15,4 @@ public class VelocityParser
 {
   private static VelocityEngine currentEngine = null;
-  public static String parseFile(String template, ContextAware process)
-  {
-    Asserts.assertFileExists("Velocity template", template);
-    Properties props = new Properties();
-    int pathBreak = template.lastIndexOf(File.separatorChar);
-    pathBreak = pathBreak == -1 ? template.length() : pathBreak;
-    String path = template.substring(0, pathBreak);
-    String file = template.substring(pathBreak + 1);
-    props.put("resource.loader", "file");
-    props.put("runtime.introspector.uberspect", TestableUberspect.class.getName());
-    props.put("file.resource.loader.path", path);
-    props.put("velocimacro.context.localscope", "" + true);
-    props.put("velocimacro.permissions.allow.inline.local.scope", "" + true);
-    return parse(file, props, new ContextAware[]{process, Default.INSTANCE});
-  }
-
-  public static String parseJar(String template, ContextAware process)
-  {
-    Properties props = new Properties();
-    props.put("resource.loader", "class");
-    props.put("class.resource.loader.description", "Velocity Classpath Resource Loader");
-    props.put("class.resource.loader.class",
-        "org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader");
-    props.put("class.resource.cache", "" + true);
-    props.put("runtime.introspector.uberspect", "com.spun.util.velocity.TestableUberspect");
-    props.put("velocimacro.context.localscope", "" + true);
-    props.put("velocimacro.permissions.allow.inline.local.scope", "" + true);
-    return parse(template, props, new ContextAware[]{process, Default.INSTANCE});
-  }
-
   public static String parseString(String template, ContextAware process)
   {
@@ -60,9 +26,4 @@ public class VelocityParser
   }
 
-  public static String parse(String template, Properties props, ContextAware process)
-  {
-    return parse(template, props, new ContextAware[]{process, Default.INSTANCE});
-  }
-
   public static String parse(String template, Properties props, ContextAware[] process)
   {
@@ -117,44 +78,6 @@ public class VelocityParser
   }
 
-  /**
-   * Parse a File to a File
-   **/
-  public static String parseFile(String templateFileName, String outputFileName, ContextAware process)
-  {
-    return parseFile(templateFileName, new File(outputFileName), process);
-  }
 
-  /**
-   * Parse a File to a File
-   **/
-  public static String parseFile(String templateFileName, File outputFile, ContextAware process)
-  {
-    try
-    {
-      String output = parseFile(templateFileName, process);
-      FileUtils.writeFile(outputFile, output);
-      return output;
-    }
-    catch (Exception e)
-    {
-      throw ObjectUtils.throwAsError(e);
-    }
-  }
-  public static class FileParseCall implements ParseCall
-  {
-    public static FileParseCall INSTANCE = new FileParseCall();
-    public String parse(String template, ContextAware process)
-    {
-      return parseFile(template, process);
-    }
-  }
-  public static class JarParseCall implements ParseCall
-  {
-    public static JarParseCall INSTANCE = new JarParseCall();
-    public String parse(String template, ContextAware process)
-    {
-      return parseJar(template, process);
-    }
-  }
+
   public static class Default implements ContextAware
   {
@@ -165,8 +88,3 @@ public class VelocityParser
     }
   }
-  public static String parseFromClassPath(Class<?> clazz, String filename, ContextAware context)
-  {
-    String resource = FileUtils.readFromClassPath(clazz, filename);
-    return parseString(resource, context);
-  }
 }
org/approvaltests/core/Options.java 171 → 101 lines (-70)
@@ -5,13 +5,8 @@ import org.approvaltests.Approvals;
 import org.approvaltests.ReporterFactory;
 import org.approvaltests.approvers.FileApprover;
-import org.approvaltests.inline.InlineComparator;
-import org.approvaltests.inline.InlineOptions;
 import org.approvaltests.namer.ApprovalNamer;
-import org.approvaltests.namer.NamerWrapper;
-import org.approvaltests.reporters.MultiReporter;
 import org.approvaltests.scrubbers.NoOpScrubber;
 import org.approvaltests.writers.ApprovalWriterFactory;
 import org.approvaltests.writers.DefaultApprovalWriterFactory;
-import org.lambda.functions.Function1;
 import org.lambda.functions.Function2;
 
@@ -30,20 +25,4 @@ public class Options
   }
 
-  public Options and(Function1<Options, Options> optionsUpdate)
-  {
-    return optionsUpdate.call(this);
-  }
-
-  public Options inline(String expected)
-  {
-    return inline(expected, InlineOptions.showCode(true));
-  }
-
-  public Options inline(String expected, InlineOptions inlineOptions)
-  {
-    InlineComparator inline = new InlineComparator(expected, inlineOptions);
-    return inline.setForOptions(this);
-  }
-
   public Options(Scrubber scrubber)
   {
@@ -67,14 +46,4 @@ public class Options
   }
 
-  public Options withReporter(ApprovalFailureReporter reporter)
-  {
-    return new Options(fields, Fields.REPORTER, reporter);
-  }
-
-  public Options addReporter(ApprovalFailureReporter reporter)
-  {
-    return this.withReporter(new MultiReporter(this.getReporter(), reporter));
-  }
-
   public Function2<File, File, VerifyResult> getComparator()
   {
@@ -82,14 +51,4 @@ public class Options
   }
 
-  public Options withComparator(Function2<File, File, VerifyResult> comparator)
-  {
-    return new Options(fields, Fields.COMPARATOR, comparator);
-  }
-
-  public Options withScrubber(Scrubber scrubber)
-  {
-    return new Options(fields, Fields.SCRUBBER, scrubber);
-  }
-
   public String scrub(String input)
   {
@@ -109,9 +68,4 @@ public class Options
   }
 
-  public Options withWriter(ApprovalWriterFactory approvalWriterFactory)
-  {
-    return new Options(fields, Fields.WRITER, approvalWriterFactory);
-  }
-
   public FileOptions forFile()
   {
@@ -140,32 +94,8 @@ public class Options
     }
 
-    public Options withNamer(ApprovalNamer namer)
-    {
-      return new Options(fields, Fields.FILE_OPTIONS_NAMER, namer);
-    }
-
     public String getFileExtension()
     {
       return ArrayUtils.getOrElse(fields, Fields.FILE_OPTIONS_FILE_EXTENSION, () -> ".txt");
     }
-
-    public Options withBaseName(String fileBaseName)
-    {
-      NamerWrapper approvalNamer = new NamerWrapper(() -> fileBaseName, getNamer());
-      return withNamer(approvalNamer);
-    }
-
-    public Options withName(String fileBaseName, String extension)
-    {
-      NamerWrapper approvalNamer = new NamerWrapper(() -> fileBaseName, getNamer());
-      EnumMap<Fields, Object> newFields = new EnumMap<>(fields);
-      newFields.put(Fields.FILE_OPTIONS_FILE_EXTENSION, extension);
-      return new Options(newFields, Fields.FILE_OPTIONS_NAMER, approvalNamer);
-    }
-
-    public Options withAdditionalInformation(String additionalInformation)
-    {
-      return withNamer(getNamer().addAdditionalInformation(additionalInformation));
-    }
   }
 }
com/spun/util/SystemUtils.java 92 → 23 lines (-69)
@@ -1,11 +1,6 @@
 package com.spun.util;
 
-import com.spun.util.logger.SimpleLogger;
 
 import java.io.File;
-import java.net.InetAddress;
-import java.net.UnknownHostException;
-import java.util.Map;
-
 public class SystemUtils
 {
@@ -14,10 +9,4 @@ public class SystemUtils
    * For example inline your usage of this method.
    */
-  @Deprecated
-  public static boolean isWindowsEnviroment()
-  {
-    return isWindowsEnvironment();
-  }
-
   public static boolean isWindowsEnvironment()
   {
@@ -25,62 +14,4 @@ public class SystemUtils
   }
 
-  public static String convertFileForCommandLine(String fileName)
-  {
-    return convertFileForCommandLine(fileName, SystemUtils.isWindowsEnvironment());
-  }
-
-  public static String getComputerName()
-  {
-    Map<String, String> env = System.getenv();
-    if (env.containsKey("COMPUTERNAME"))
-    {
-      return env.get("COMPUTERNAME");
-    }
-    else if (env.containsKey("HOSTNAME"))
-    {
-      return env.get("HOSTNAME");
-    }
-    else
-    {
-      String hostname = "Unknown Computer";
-      try
-      {
-        InetAddress addr;
-        addr = InetAddress.getLocalHost();
-        hostname = addr.getHostName();
-      }
-      catch (UnknownHostException ex)
-      {
-        SimpleLogger.warning("Hostname can not be resolved", ex);
-      }
-      return hostname;
-    }
-  }
-
-  public static String convertFileForCommandLine(String fileName, boolean windowsOs)
-  {
-    if (!fileName.contains(" "))
-    {
-      return fileName;
-    }
-    else if (windowsOs)
-    {
-      return String.format("\"%s\"", fileName);
-    }
-    else
-    {
-      return fileName.replace(" ", "\\ ");
-    }
-  }
-
-  /**
-   * @deprecated Use {@link #isMacEnvironment()} instead.
-   * For example inline your usage of this method.
-   */
-  @Deprecated
-  public static boolean isMacEnviroment()
-  {
-    return isMacEnvironment();
-  }
 
   public static boolean isMacEnvironment()
com/spun/util/Asserts.java 76 → 11 lines (-65)
@@ -1,7 +1,4 @@
 package com.spun.util;
 
-import com.spun.util.io.FileUtils;
-import java.io.File;
-
 public class Asserts
 {
@@ -12,65 +9,3 @@ public class Asserts
     return o;
   }
-
-  public static void assertEqual(String label, int expected, int actual)
-  {
-    if (expected != actual)
-    { throw new IllegalStateException(label + " " + expected + "!=" + actual); }
-  }
-
-  public static void assertFileDoesNotExist(String label, String fileName)
-  {
-    File file = new File(fileName);
-    if (file.exists())
-    { throw new IllegalStateException(label + " file " + FileUtils.getResolvedPath(file) + " already exists"); }
-  }
-
-  public static void assertFileExists(String label, String fileName)
-  {
-    File file = new File(fileName);
-    if (!file.exists())
-    { throw new IllegalStateException(label + " file " + FileUtils.getResolvedPath(file) + " does not exist"); }
-  }
-
-  public static void equals(String label, double expected, double actual, double percission)
-  {
-    if (!NumberUtils.equals(expected, actual, percission))
-    { throw new IllegalStateException(label + " " + expected + "!=" + actual); }
-  }
-
-  public static void notEquals(String label, double expected, double actual)
-  {
-    if (actual == expected)
-    { throw new IllegalStateException(label + " " + expected + "!=" + actual); }
-  }
-
-  public static void assertEqual(String label, Object expected, Object actual)
-  {
-    if (!ObjectUtils.isEqual(expected, actual))
-    { throw new IllegalStateException(label + " " + expected + "!=" + actual); }
-  }
-
-  public static void assertNotEqual(String label, Object expected, Object actual)
-  {
-    if (ObjectUtils.isEqual(expected, actual))
-    { throw new IllegalStateException(label + " can't = " + expected); }
-  }
-
-  public static void assertEqual(String label, double expected, double actual, double precision)
-  {
-    if (!NumberUtils.equals(expected, actual, precision))
-    { throw new IllegalStateException(label + " " + expected + "!=" + actual + "within delta of" + precision); }
-  }
-
-  public static void assertStartsWith(String label, String haystack, String needle)
-  {
-    if (haystack == null || !haystack.startsWith(needle))
-    { throw new IllegalStateException(label + " " + haystack + " does not start with " + needle); }
-  }
-
-  public static void assertTrue(String label, boolean b)
-  {
-    if (!b)
-    { throw new IllegalStateException(label + " was false"); }
-  }
 }
com/spun/util/WindowUtils.java 83 → 18 lines (-65)
@@ -1,50 +1,8 @@
 package com.spun.util;
 
-import com.spun.swing.Paintable;
-import com.spun.swing.Paintables;
-import com.spun.util.logger.SimpleLogger;
 
-import javax.swing.JFrame;
 import javax.swing.JOptionPane;
-import javax.swing.JPanel;
-import java.awt.Dimension;
-import java.awt.event.WindowAdapter;
-
 public class WindowUtils
 {
-  public static void centerWindow(java.awt.Window window)
-  {
-    Dimension d = java.awt.Toolkit.getDefaultToolkit().getScreenSize();
-    Dimension w = window.getSize();
-    int dx = (int) w.getWidth();
-    int dy = (int) w.getHeight();
-    int x = (int) ((d.getWidth() - dx) / 2);
-    int y = (int) ((d.getHeight() - dy) / 2);
-    SimpleLogger.variable(" size (" + x + "," + y + "," + dx + "," + dy + ")");
-    window.setBounds(x, y, dx, dy + 1);
-  }
-
-  public static void testPanel(JPanel panel)
-  {
-    JFrame test = new JFrame("Testing Frame");
-    test.getContentPane().add(panel);
-    testFrame(test, true);
-  }
-
-  public static void testPaintable(Paintable paintable)
-  {
-    testPanel(Paintables.asPanel(paintable));
-  }
-
-  public static void testFrame(JFrame frame)
-  {
-    testFrame(frame, true);
-  }
-
-  public static void copyToClipBoard(String code)
-  {
-    copyToClipBoard(code, true);
-  }
-
   public static void copyToClipBoard(String code, boolean displayMessage)
   {
@@ -58,26 +16,3 @@ public class WindowUtils
     frame.dispose();
   }
-
-  public static void testFrame(JFrame frame, boolean closeOnExit)
-  {
-    if (closeOnExit)
-    {
-      testFrame(frame, new FrameCloser());
-    }
-    else
-    {
-      testFrame(frame);
-    }
-  }
-
-  public static void testFrame(JFrame frame, WindowAdapter... array)
-  {
-    frame.pack();
-    for (WindowAdapter closer : array)
-    {
-      frame.addWindowListener(closer);
-    }
-    WindowUtils.centerWindow(frame);
-    frame.setVisible(true);
-  }
 }
com/spun/util/parser/TemplateDate.java 193 → 135 lines (-58)
@@ -2,12 +2,9 @@ package com.spun.util.parser;
 
 import com.spun.util.DateDifference;
-import com.spun.util.DateUtils;
 import com.spun.util.StringUtils;
 
 import java.text.DateFormat;
 import java.text.SimpleDateFormat;
-import java.util.Calendar;
 import java.util.Date;
-import java.util.GregorianCalendar;
 import java.util.Locale;
 import java.util.TimeZone;
@@ -42,9 +39,4 @@ public class TemplateDate
   }
 
-  public void freezeTime()
-  {
-    frozen = new Date();
-  }
-
   public String getDate(String style)
   {
@@ -137,57 +129,7 @@ public class TemplateDate
   }
 
-  public DateDifference getDifferenceFromToday()
-  {
-    if (difference == null)
-    {
-      difference = new DateDifference(getDate(false), new Date());
-    }
-    return difference;
-  }
-
-  public String getDay()
-  {
-    GregorianCalendar cal = new GregorianCalendar();
-    cal.setTime(getDate(false));
-    return StringUtils.padNumber(cal.get(Calendar.DAY_OF_MONTH), 2);
-  }
-
-  public String getMonth(int offset)
-  {
-    GregorianCalendar cal = new GregorianCalendar();
-    cal.setTime(getDate(false));
-    return StringUtils.padNumber(cal.get(Calendar.MONTH) + offset, 2);
-  }
-
-  public String getMonthName()
-  {
-    return new SimpleDateFormat("MMMM").format(getDate(false));
-  }
-
-  public String getYear()
-  {
-    GregorianCalendar cal = new GregorianCalendar();
-    cal.setTime(getDate(false));
-    return StringUtils.padNumber(cal.get(Calendar.YEAR), 4);
-  }
-
-  public boolean isToday()
-  {
-    return DateUtils.isToday(getDate(false));
-  }
-
   public String toString()
   {
     return this.getDate("", "");
   }
-
-  public String getDateAndTime(String dateFormat, String timeFormat)
-  {
-    return getDate(dateFormat) + " " + getTime(timeFormat);
-  }
-
-  public String getDateAndTime()
-  {
-    return getDateAndTime("default", "default");
-  }
 }
org/approvaltests/JsonApprovals.java 68 → 21 lines (-47)
@@ -1,9 +1,6 @@
 package org.approvaltests;
 
-import com.google.gson.GsonBuilder;
 import com.spun.util.JsonUtils;
 import org.approvaltests.core.Options;
-import org.lambda.functions.Function1;
-
 /**
  * Requires (GSON)[https://mvnrepository.com/artifact/com.google.code.gson/gson]
@@ -11,38 +8,4 @@ import org.lambda.functions.Function1;
 public class JsonApprovals
 {
-  public static void verifyJson(String json)
-  {
-    verifyJson(json, new Options());
-  }
-
-  public static void verifyJson(String json, Options options)
-  {
-    verifyJson(json, false, options);
-  }
-
-  public static void verifyJson(String json, boolean reorderJson)
-  {
-    verifyJson(json, reorderJson, new Options());
-  }
-
-  public static void verifyJson(String json, boolean reorderJson, Function1<GsonBuilder, GsonBuilder> gsonBuilder)
-  {
-    verifyJson(json, reorderJson, gsonBuilder, new Options());
-  }
-
-  public static void verifyJson(String json, boolean reorderJson, Function1<GsonBuilder, GsonBuilder> gsonBuilder,
-      Options options)
-  {
-    String formattedJson = reorderJson
-        ? JsonUtils.reorderFields(json, gsonBuilder)
-        : JsonUtils.prettyPrint(json, gsonBuilder);
-    Approvals.verify(formattedJson, options.forFile().withExtension(".json"));
-  }
-
-  public static void verifyJson(String json, boolean reorderJson, Options options)
-  {
-    verifyJson(json, reorderJson, g -> g, options);
-  }
-
   public static void verifyAsJson(Object o)
   {
@@ -50,14 +13,4 @@ public class JsonApprovals
   }
 
-  public static void verifyAsJson(Object o, Function1<GsonBuilder, GsonBuilder> gsonBuilder)
-  {
-    verifyAsJson(o, gsonBuilder, new Options());
-  }
-
-  public static void verifyAsJson(Object o, Function1<GsonBuilder, GsonBuilder> gsonBuilder, Options options)
-  {
-    Approvals.verify(JsonUtils.asJson(o, gsonBuilder), options.forFile().withExtension(".json"));
-  }
-
   // begin-snippet: verify_as_json
   public static void verifyAsJson(Object o, Options options)
org/approvaltests/namer/NamerFactory.java 75 → 32 lines (-43)
@@ -1,8 +1,5 @@
 package org.approvaltests.namer;
 
-import com.spun.util.StringUtils;
-import com.spun.util.SystemUtils;
 import org.approvaltests.core.ApprovalTestPackageSettings;
-import org.lambda.functions.Function0;
 import org.packagesettings.PackageLevelSettings;
 
@@ -24,29 +21,4 @@ public class NamerFactory
   }
   public static ApprovalResults ApprovalResults = new ApprovalResults();
-  public static NamedEnvironment asMachineSpecificTest(Function0<String> environmentLabeller)
-  {
-    return asMachineSpecificTest(environmentLabeller.call());
-  }
-
-  public static NamedEnvironment asMachineNameSpecificTest()
-  {
-    return asMachineSpecificTest(SystemUtils.getComputerName());
-  }
-
-  public static NamedEnvironment asOsSpecificTest()
-  {
-    return asMachineSpecificTest(new OsEnvironmentLabeller());
-  }
-
-  public static NamedEnvironment asMachineSpecificTest(String environmentName)
-  {
-    return new NamedEnvironment(environmentName);
-  }
-
-  public static MultipleFilesLabeller useMultipleFiles()
-  {
-    return new MultipleFilesLabeller();
-  }
-
   public static String getSubdirectory()
   {
@@ -58,18 +30,3 @@ public class NamerFactory
     return PackageLevelSettings.getValueFor(ApprovalTestPackageSettings.APPROVAL_BASE_DIRECTORY);
   }
-
-  public static NamedEnvironment withParameters(Object... parameters)
-  {
-    return new NamedEnvironment(StringUtils.join(parameters, ".", o -> "" + o));
-  }
-
-  public static boolean isEmpty()
-  {
-    return additionalInformation.get() == null;
-  }
-
-  public static void setAdditionalInformation(String info)
-  {
-    additionalInformation.set(info);
-  }
 }
org/lambda/query/Queryable.java 324 → 282 lines (-42)
@@ -34,16 +34,4 @@ public class Queryable<In> extends ArrayList<In>
   }
 
-  public static <In> Queryable<In> createEmpty(In[] list)
-  {
-    if (list == null)
-    {
-      return new Queryable<>();
-    }
-    else
-    {
-      return new Queryable(list.getClass().getComponentType());
-    }
-  }
-
   public <T extends Extendable<List<In>>> T use(Class<T> that)
   {
@@ -156,24 +144,4 @@ public class Queryable<In> extends ArrayList<In>
   }
 
-  public static <T> Queryable<T> of(List<T> list)
-  {
-    return as(list);
-  }
-
-  public static <T> Queryable<T> of(List<T> list, Class<T> type)
-  {
-    return as(list, type);
-  }
-
-  public static <T> Queryable<T> of(Set<T> set)
-  {
-    return as(set);
-  }
-
-  public static <T> Queryable<T> of(Set<T> set, Class<T> type)
-  {
-    return as(set, type);
-  }
-
   public static <T> Queryable<T> of(T... array)
   {
@@ -181,9 +149,4 @@ public class Queryable<In> extends ArrayList<In>
   }
 
-  public static <T> Queryable<T> of(Stream<T> stream)
-  {
-    return as(stream);
-  }
-
   public static <T> Queryable<T> as(List<T> list)
   {
@@ -206,9 +169,4 @@ public class Queryable<In> extends ArrayList<In>
   }
 
-  public static <T> Queryable<T> as(Set<T> set, Class<T> type)
-  {
-    return as(new ArrayList<>(set), type);
-  }
-
   public static <T> Queryable<T> as(T... array)
   {
org/approvaltests/namer/NamerFactoryForOptions.java 51 → 9 lines (-42)
@@ -1,7 +1,4 @@
 package org.approvaltests.namer;
 
-import com.spun.util.SystemUtils;
-import org.approvaltests.core.Options;
-
 public class NamerFactoryForOptions
 {
@@ -10,42 +7,3 @@ public class NamerFactoryForOptions
   {
   }
-
-  public Options asOsSpecificTest()
-  {
-    return asOsSpecificTest(new Options());
-  }
-
-  public Options asOsSpecificTest(Options options)
-  {
-    return options.forFile().withAdditionalInformation(new OsEnvironmentLabeller().call());
-  }
-
-  public Options asMachineNameSpecificTest()
-  {
-    return asMachineNameSpecificTest(new Options());
-  }
-
-  public Options asMachineNameSpecificTest(Options options)
-  {
-    return options.forFile().withAdditionalInformation(SystemUtils.getComputerName());
-  }
-
-  public Options withParameters(String... parameters)
-  {
-    return withParameters(new Options(), parameters);
-  }
-
-  public Options withParameters(Options options, String... parameters)
-  {
-    for (String parameter : parameters)
-    {
-      options = options.forFile().withAdditionalInformation(parameter);
-    }
-    return options;
-  }
-
-  public FileCounter useMultipleFiles()
-  {
-    return new FileCounter();
-  }
 }
org/lambda/actions/Action0.java 31 → 9 lines (-22)
@@ -1,6 +1,4 @@
 package org.lambda.actions;
 
-import com.spun.util.ObjectUtils;
-
 /**
   * Findable name for java.lang.Runnable
@@ -8,24 +6,4 @@ import com.spun.util.ObjectUtils;
 public interface Action0
 {
-  public static Action0 doNothing()
-  {
-    return () -> {
-    };
-  }
-
   public void call();
-
-  public static Action0 runtime(Action0WithException exceptions)
-  {
-    return () -> {
-      try
-      {
-        exceptions.call();
-      }
-      catch (Throwable t)
-      {
-        throw ObjectUtils.throwAsError(t);
-      }
-    };
-  }
 }
org/approvaltests/reporters/DiffInfo.java 112 → 90 lines (-22)
@@ -1,12 +1,8 @@
 package org.approvaltests.reporters;
 
-import com.spun.util.ArrayUtils;
 
 import java.io.File;
 import java.util.ArrayList;
-import java.util.HashSet;
 import java.util.List;
-import java.util.Objects;
-
 public class DiffInfo
 {
@@ -22,9 +18,4 @@ public class DiffInfo
   }
 
-  public static DiffInfo getNull()
-  {
-    return new DiffInfo(null, null, null);
-  }
-
   private static String resolveWindowsPath(String diffProgram)
   {
@@ -97,16 +88,3 @@ public class DiffInfo
     }
   }
-  public static class One
-  {
-    public static String of(String pathOne, String... paths)
-    {
-      final String[] all = ArrayUtils.combine(pathOne, paths);
-      for (String path : all)
-      {
-        if (new File(path).exists())
-        { return path; }
-      }
-      return pathOne;
-    }
-  }
 }
com/spun/util/io/NetUtils.java 73 → 53 lines (-20)
@@ -2,6 +2,4 @@ package com.spun.util.io;
 
 import com.spun.util.ObjectUtils;
-import com.spun.util.logger.Markers;
-import com.spun.util.logger.SimpleLogger;
 
 import java.io.InputStream;
@@ -16,14 +14,4 @@ import java.time.Duration;
 public class NetUtils
 {
-  public static String loadWebPage(String url)
-  {
-    return loadWebPage(url, null);
-  }
-
-  public static String loadWebPage(String url, String parameters)
-  {
-    return loadWebPage(url, parameters, null);
-  }
-
   public static String loadWebPage(String url, String parameters, Duration timeout)
   {
@@ -63,11 +51,3 @@ public class NetUtils
   }
 
-  /**
-   * @deprecated Use {@link #loadWebPage(String)} instead.
-   */
-  @Deprecated
-  public static String readWebpage(String query)
-  {
-    return loadWebPage(query, null);
-  }
 }
com/spun/util/velocity/StringResourceLoader.java 54 → 37 lines (-17)
@@ -1,26 +1,9 @@
 package com.spun.util.velocity;
 
-/*
- * Copyright 2001-2002,2004 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-import com.spun.util.StringUtils;
-import org.apache.velocity.exception.ResourceNotFoundException;
+
 import org.apache.velocity.runtime.resource.Resource;
 import org.apache.velocity.runtime.resource.loader.ResourceLoader;
 import org.apache.velocity.util.ExtProperties;
 
-import java.io.InputStream;
 import java.io.Reader;
 import java.io.StringReader;
com/spun/util/database/ResultSetWriter.java 66 → 52 lines (-14)
@@ -6,22 +6,8 @@ import java.sql.ResultSet;
 import java.sql.ResultSetMetaData;
 import java.util.ArrayList;
-import java.util.Arrays;
 import java.util.List;
 
 public class ResultSetWriter
 {
-  public static String toString(ResultSet rs)
-  {
-    List<String[]> results = extractResults(rs);
-    List<String> metaData = extractMetaData(rs);
-    StringBuffer sb = new StringBuffer();
-    sb.append(metaData.toString() + "\n");
-    for (String[] strings : results)
-    {
-      sb.append(Arrays.toString(strings) + "\n");
-    }
-    return sb.toString();
-  }
-
   public static List<String[]> extractResults(ResultSet rs)
   {
org/lambda/utils/Once.java 40 → 29 lines (-11)
@@ -3,5 +3,4 @@ package org.lambda.utils;
 import com.spun.util.ThreadUtils;
 import org.lambda.actions.Action0;
-import org.lambda.functions.Function0;
 
 import java.util.Collections;
@@ -15,9 +14,4 @@ public class Once
   private static final Set<Class>         actions   = Collections.synchronizedSet(new HashSet<>());
   private static final Map<Class, Object> functions = Collections.synchronizedMap(new HashMap<>());
-  public static void run(Action0 runnable)
-  {
-    run(runnable, runnable.getClass());
-  }
-
   public static void runAsync(Action0 runnable)
   {
@@ -33,8 +27,3 @@ public class Once
     }
   }
-
-  public static <T> T run(Function0<T> runnable)
-  {
-    return (T) functions.computeIfAbsent(runnable.getClass(), k -> runnable.call());
-  }
 }
org/approvaltests/SafetyCheckBeforeVerify.java 28 → 17 lines (-11)
@@ -15,14 +15,3 @@ public class SafetyCheckBeforeVerify
     check.call(approver, options);
   }
-
-  public static void add(Action2<ApprovalApprover, Options> newCheck)
-  {
-    Action2<ApprovalApprover, Options> oldCheck = guardRailCheck.get();
-    guardRailCheck.set(newCheck);
-  }
-
-  public static void clear()
-  {
-    guardRailCheck.remove();
-  }
 }
org/lambda/query/OrderBy.java 51 → 41 lines (-10)
@@ -23,14 +23,4 @@ public class OrderBy<T, Out extends Comparable<?>> implements Comparator<T>
   }
 
-  public static <T, Out extends Comparable<Out>> OrderBy<T, Out> ascending(Function1<T, Out> f1)
-  {
-    return new OrderBy<>(Order.Ascending, f1);
-  }
-
-  public static <T, Out extends Comparable<Out>> OrderBy<T, Out> descending(Function1<T, Out> f1)
-  {
-    return new OrderBy<>(Order.Descending, f1);
-  }
-
   @Override
   public int compare(T a, T b)
org/packagesettings/Field.java 37 → 27 lines (-10)
@@ -25,13 +25,3 @@ public class Field<T>
     return isPresent(settings) ? (T) settings.get(Name).getValue() : defaultValue.call();
   }
-
-  public String getFieldName()
-  {
-    return Name;
-  }
-
-  public Class<T> getFieldClass()
-  {
-    return Class;
-  }
 }
org/approvaltests/namer/ApprovalResults.java 15 → 6 lines (-9)
@@ -3,13 +3,4 @@ package org.approvaltests.namer;
 public class ApprovalResults
 {
-  /**
-   * @deprecated Use {@link NamerFactory#useMultipleFiles()} instead.
-   */
-  @Deprecated
-  public MultipleFilesLabeller useMultipleFiles()
-  {
-    MultipleFilesLabeller l = new MultipleFilesLabeller();
-    l.next();
-    return l;
-  }
+
 }
org/approvaltests/approvers/FileApprover.java 102 → 94 lines (-8)
@@ -2,5 +2,4 @@ package org.approvaltests.approvers;
 
 import com.spun.util.ObjectUtils;
-import com.spun.util.QuietAutoCloseable;
 import com.spun.util.io.FileUtils;
 import org.approvaltests.internal.logs.ApprovedFileLog;
@@ -44,11 +43,4 @@ public class FileApprover implements ApprovalApprover
   }
 
-  public static QuietAutoCloseable registerErrorGenerator(Function2<String, String, Error> errorGenerator)
-  {
-    Function2<String, String, Error> old = FileApprover.errorGenerator;
-    FileApprover.errorGenerator = errorGenerator;
-    return () -> FileApprover.errorGenerator = old;
-  }
-
   public VerifyResult approve()
   {
org/packagesettings/PackageLevelSettings.java 126 → 120 lines (-6)
@@ -109,10 +109,4 @@ public class PackageLevelSettings
   }
 
-  public static Object getValueFor(String key)
-  {
-    Settings settings = get().get(key);
-    return settings == null ? null : settings.getValue();
-  }
-
   public static <T> T getValueFor(org.packagesettings.Field<T> field)
   {
org/packagesettings/Settings.java 27 → 22 lines (-5)
@@ -4,9 +4,4 @@ public class Settings
 {
   private String location;
-  public String getLocation()
-  {
-    return location;
-  }
-
   public Object getValue()
   {
org/approvaltests/approvers/ApprovalTracker.java 25 → 20 lines (-5)
@@ -18,8 +18,3 @@ public class ApprovalTracker
     tracked.add(approved);
   }
-
-  public void addAllowedDuplicates(Function1<String, Boolean> duplicateChecker)
-  {
-    allowedDuplicates.add(duplicateChecker);
-  }
 }
org/approvaltests/reporters/FirstWorkingReporter.java 59 → 54 lines (-5)
@@ -41,9 +41,4 @@ public class FirstWorkingReporter implements ReporterWithApprovalPower
   }
 
-  public ApprovalFailureReporter[] getReporters()
-  {
-    return reporters;
-  }
-
   @Override
   public String toString()
org/approvaltests/reporters/MultiReporter.java 53 → 48 lines (-5)
@@ -41,9 +41,4 @@ public class MultiReporter implements ApprovalFailureReporter
   }
 
-  public ApprovalFailureReporter[] getReporters()
-  {
-    return reporters.toArray(new ApprovalFailureReporter[0]);
-  }
-
   @Override
   public String toString()
org/approvaltests/namer/AttributeStackSelector.java 169 → 166 lines (-3)
@@ -12,8 +12,5 @@ import java.lang.annotation.Annotation;
 import java.lang.reflect.Method;
 import java.util.ArrayList;
-import java.util.Arrays;
 import java.util.List;
-import java.util.stream.Collectors;
-
 public class AttributeStackSelector implements StackElementSelector
 {
org/approvaltests/reporters/ClipboardReporter.java 58 → 57 lines (-1)
@@ -3,5 +3,4 @@ package org.approvaltests.reporters;
 import com.spun.util.SystemUtils;
 import com.spun.util.WindowUtils;
-import com.spun.util.logger.SimpleLogger;
 import org.approvaltests.core.ApprovalFailureReporter;
 

Deleted files (305)

com.spun.swing 4 files · 68 lines
com.spun.util 39 files · 4,632 lines
com.spun.util.database 27 files · 2,524 lines
com.spun.util.database.automaticsetter 7 files · 260 lines
com.spun.util.date 2 files · 197 lines
com.spun.util.filters 8 files · 109 lines
com.spun.util.images 1 files · 80 lines
com.spun.util.introspection 2 files · 45 lines
com.spun.util.io 14 files · 1,046 lines
com.spun.util.io.filefilters 3 files · 52 lines
com.spun.util.io.xml 10 files · 491 lines
com.spun.util.logger 4 files · 75 lines
com.spun.util.markdown 1 files · 6 lines
com.spun.util.markdown.table 6 files · 278 lines
com.spun.util.parser 10 files · 699 lines
com.spun.util.persistence 8 files · 141 lines
com.spun.util.persistence.test 3 files · 55 lines
com.spun.util.quartz 1 files · 26 lines
com.spun.util.servlets 2 files · 239 lines
com.spun.util.sql 3 files · 1,386 lines
com.spun.util.tests 1 files · 29 lines
com.spun.util.timers 8 files · 674 lines
com.spun.util.timers.test 1 files · 23 lines
com.spun.util.velocity 3 files · 225 lines
org.approvaltests 11 files · 483 lines
org.approvaltests.awt 4 files · 353 lines
org.approvaltests.combinations 4 files · 889 lines
org.approvaltests.combinations.pairwise 5 files · 540 lines
org.approvaltests.core 3 files · 34 lines
org.approvaltests.inline 6 files · 595 lines
org.approvaltests.integrations.junit5 1 files · 48 lines
org.approvaltests.legacycode 1 files · 37 lines
org.approvaltests.namer 7 files · 276 lines
org.approvaltests.reporters 24 files · 633 lines
org.approvaltests.reporters.linux 2 files · 44 lines
org.approvaltests.scrubbers 6 files · 349 lines
org.approvaltests.strings 2 files · 83 lines
org.approvaltests.testcommitrevert 2 files · 25 lines
org.approvaltests.utils 3 files · 132 lines
org.approvaltests.utils.logger 2 files · 40 lines
org.approvaltests.utils.parseinput 4 files · 299 lines
org.approvaltests.velocity 1 files · 45 lines
org.approvaltests.writers 6 files · 255 lines
org.lambda.actions 18 files · 220 lines
org.lambda.functions 17 files · 165 lines
org.lambda.query 5 files · 143 lines
org.lambda.utils 3 files · 129 lines