Code cleaning

Most notable change: Remove redundant type parameters and replaced with <>. This is a small step to bring us closer to upstream parity.
This commit is contained in:
matt
2019-02-15 21:46:10 -05:00
parent 3236bdd78e
commit 85bfd16d7c
82 changed files with 1417 additions and 1406 deletions

View File

@ -69,7 +69,7 @@ public class Expression {
private static final ThreadLocal<ArrayDeque<Expression>> instance = ThreadLocal.withInitial(ArrayDeque::new);
private final Map<String, RValue> variables = new HashMap<String, RValue>();
private final Map<String, RValue> variables = new HashMap<>();
private final String[] variableNames;
private Variable[] variableArray;
private RValue root;

View File

@ -124,7 +124,7 @@ public final class Functions {
throw new NoSuchMethodException(); // TODO: return null (check for side-effects first)
}
private static final Map<String, List<Overload>> functions = new HashMap<String, List<Overload>>();
private static final Map<String, List<Overload>> functions = new HashMap<>();
static {
for (Method method : Functions.class.getMethods()) {
@ -143,7 +143,7 @@ public final class Functions {
List<Overload> overloads = functions.get(methodName);
if (overloads == null) {
functions.put(methodName, overloads = new ArrayList<Overload>());
functions.put(methodName, overloads = new ArrayList<>());
}
overloads.add(overload);
@ -281,8 +281,8 @@ public final class Functions {
}
private static final Map<Integer, double[]> gmegabuf = new HashMap<Integer, double[]>();
private final Map<Integer, double[]> megabuf = new HashMap<Integer, double[]>();
private static final Map<Integer, double[]> gmegabuf = new HashMap<>();
private final Map<Integer, double[]> megabuf = new HashMap<>();
public Map<Integer, double[]> getMegabuf() {
return megabuf;