Skip to content

Commit

Permalink
Refactoring, got rid of some warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
dschadow committed Mar 31, 2018
1 parent 8e68bd0 commit e525fa7
Showing 1 changed file with 3 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
public final class ActionCascadeService {
private static ActionCascadeService service = null;

private IObservableList actionItems = new WritableList();
private IObservableList<ActionItem> actionItems = new WritableList<ActionItem>();
private ActionCascade currentActionCascade;

private ActionCascadeService() {
Expand Down Expand Up @@ -71,20 +71,18 @@ public void removeItem(ActionItem item) {
actionItems.remove(item);
}

public void setActionItems(WritableList ai) {
public void setActionItems(WritableList<ActionItem> ai) {
this.actionItems = ai;
}

@SuppressWarnings("unchecked")
public List<ActionItem> getActionItems() {
return (List<ActionItem>) Collections.checkedList(actionItems, ActionItem.class);
}

public IObservableList observeActionItems() {
public IObservableList<ActionItem> observeActionItems() {
return actionItems;
}

@SuppressWarnings("unchecked")
public void moveUp(ActionItem item) {
ArrayList<ActionItem> l = currentActionCascade.getAllItems();
int i = l.indexOf(item);
Expand All @@ -97,7 +95,6 @@ public void moveUp(ActionItem item) {
}
}

@SuppressWarnings("unchecked")
public void moveDown(ActionItem item) {
ArrayList<ActionItem> l = currentActionCascade.getAllItems();
int i = l.indexOf(item);
Expand Down

0 comments on commit e525fa7

Please sign in to comment.