Method Of Retrieving Random Value Depending on Type
1) I don't think you need to define an enum since you can use Boolean.class, Integer.class, etc.

2) 

public static &lt;T&gt; T getRandom(Class&lt;T&gt; classs) {
  if (classs.equals(Boolean.class)) {
      return (T) randomBool();
  } else if (classs.equals(Integer.class) {
      return (T) randomInt();
  // etc.
  } else
      // Edit: original "else" was: "return null;" changed to:
      throw new IllegalStateException("Cannot generate a random " + classs.toString());
}


EDIT
There is also the solution below, but that would still require casting:

   public enum Type {
    INTEGER {
        @Override public Integer getRandom() {
            return new randomInt();
        }
    }; // BOOLEAN, etc. 

    public abstract Object getRandom();
}


That is basically the same as the original OP code, but where the random method call is within the enum instead of being in a separate method with a switch-statement.