Generics for everyone \o/

This commit is contained in:
Chocohead committed 2017-01-26 18:18:14 +00:00
1 parent ac9344cbda
commit 23ed2dcaea
55 files changed
+164 -163

No files matched your search

@@ -49,13 +49,12 @@ public class ControlList<T> extends Control implements IControlValue<T> {
public void setOptions(final Collection<T> options) {
this.deleteAllChildren();
this.allOptions.clear();
int i = 0;
for (final T option : options) {
final IWidget optionWidget = ((ControlListBox) this.getParent()).createOption(option, 0);
@SuppressWarnings("unchecked")
final IWidget optionWidget = ((ControlListBox<T>) this.getParent()).createOption(option, 0);
if (optionWidget != null) {
this.allOptions.put(option, optionWidget);
}
++i;
}
this.filterOptions();
}