explicit parameters are not needed

This commit is contained in:
vyacheslav.raskulin 2020-09-09 14:47:47 +03:00
parent 96b2094370
commit e03b446601
5 changed files with 11 additions and 11 deletions

View file

@ -17,7 +17,7 @@ import javax.swing.JComponent;
public class ManaBarChart extends JComponent {
Map<String, Integer> pips_at_cmcs = new HashMap<String, Integer>();
Map<String, Integer> pips_at_cmcs = new HashMap<>();
ManaBarChart() {
}
@ -43,7 +43,7 @@ public class ManaBarChart extends JComponent {
void drawBar(Graphics2D g, Rectangle area) {
Pattern regex = Pattern.compile("^([0-9]+)##(.)}");
Map<Integer, Integer> totals_at_cmcs = new HashMap<Integer, Integer>();
Map<Integer, Integer> totals_at_cmcs = new HashMap<>();
int max_num_pips = 0;
int max_cmc = 0;
@ -112,7 +112,7 @@ public class ManaBarChart extends JComponent {
}
Map<Integer, Integer> running_totals_at_cmcs = new HashMap<Integer, Integer>();
Map<Integer, Integer> running_totals_at_cmcs = new HashMap<>();
for (String key : pips_at_cmcs.keySet()) {
Matcher regexMatcher = regex.matcher(key);
int num_pips = pips_at_cmcs.get(key);

View file

@ -644,7 +644,7 @@ public class CheckBoxList extends JList {
int i;
// traverse over model
list = new Vector<Integer>();
list = new Vector<>();
for (i = 0; i < getModel().getSize(); i++) {
if (getChecked(i)) {
list.add(new Integer(i));

View file

@ -29,22 +29,22 @@ public abstract class AbstractProperties implements Properties {
@Override
public <T> Property<T> property(String name) {
return property(name, new BasicProperty<T>());
return property(name, new BasicProperty<>());
}
@Override
public <E> List<E> list(String name) {
return list(name, new ArrayList<E>());
return list(name, new ArrayList<>());
}
@Override
public <E> Set<E> set(String name) {
return set(name, new HashSet<E>());
return set(name, new HashSet<>());
}
@Override
public <K, V> Map<K, V> map(String name) {
return map(name, new HashMap<K, V>());
return map(name, new HashMap<>());
}
}

View file

@ -21,8 +21,8 @@ public enum CopyPasteImageSource implements CardImageSource {
instance;
private final Set<String> supportedSets = new LinkedHashSet<String>();
private final Set<String> missingCards = new LinkedHashSet<String>();
private final Set<String> supportedSets = new LinkedHashSet<>();
private final Set<String> missingCards = new LinkedHashSet<>();
Map<String, String> singleLinks = null;
boolean loadedFromDialog = false;
boolean viewMissingCards = true;

View file

@ -26,7 +26,7 @@ public enum TokensMtgImageSource implements CardImageSource {
// [[EXP/Name, TokenData>
private HashMap<String, List<TokenData>> tokensData;
private static final Set<String> supportedSets = new LinkedHashSet<String>();
private static final Set<String> supportedSets = new LinkedHashSet<>();
private final Object tokensDataSync = new Object();