erase unnecessary types

This commit is contained in:
Ben Fry
2017-10-10 21:00:32 -04:00
parent 65b138de31
commit 2dde225eae
3 changed files with 9 additions and 9 deletions

View File

@@ -23,7 +23,7 @@ public class FloatDict {
protected float[] values;
/** Internal implementation for faster lookups */
private HashMap<String, Integer> indices = new HashMap<String, Integer>();
private HashMap<String, Integer> indices = new HashMap<>();
public FloatDict() {
@@ -146,12 +146,12 @@ public class FloatDict {
*/
public void clear() {
count = 0;
indices = new HashMap<String, Integer>();
indices = new HashMap<>();
}
private void resetIndices() {
indices = new HashMap<String, Integer>(count);
indices = new HashMap<>(count);
for (int i = 0; i < count; i++) {
indices.put(keys[i], i);
}

View File

@@ -23,7 +23,7 @@ public class IntDict {
protected int[] values;
/** Internal implementation for faster lookups */
private HashMap<String, Integer> indices = new HashMap<String, Integer>();
private HashMap<String, Integer> indices = new HashMap<>();
public IntDict() {
@@ -147,12 +147,12 @@ public class IntDict {
*/
public void clear() {
count = 0;
indices = new HashMap<String, Integer>();
indices = new HashMap<>();
}
private void resetIndices() {
indices = new HashMap<String, Integer>(count);
indices = new HashMap<>(count);
for (int i = 0; i < count; i++) {
indices.put(keys[i], i);
}

View File

@@ -23,7 +23,7 @@ public class StringDict {
protected String[] values;
/** Internal implementation for faster lookups */
private HashMap<String, Integer> indices = new HashMap<String, Integer>();
private HashMap<String, Integer> indices = new HashMap<>();
public StringDict() {
@@ -168,12 +168,12 @@ public class StringDict {
*/
public void clear() {
count = 0;
indices = new HashMap<String, Integer>();
indices = new HashMap<>();
}
private void resetIndices() {
indices = new HashMap<String, Integer>(count);
indices = new HashMap<>(count);
for (int i = 0; i < count; i++) {
indices.put(keys[i], i);
}