|
|
@ -1,9 +1,7 @@ |
|
|
|
package app.navigation.matchday; |
|
|
|
|
|
|
|
import app.data.entity.Match; |
|
|
|
import app.data.entity.Matchday; |
|
|
|
import app.data.entity.Season; |
|
|
|
import app.data.service.MatchService; |
|
|
|
import app.data.service.MatchdayService; |
|
|
|
import app.data.service.SeasonService; |
|
|
|
import app.navigation.Navigable; |
|
|
@ -30,7 +28,7 @@ public class MatchdayNavigation extends Navigation { |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
@SuppressWarnings({"unchecked", "DuplicatedCode"}) |
|
|
|
@SuppressWarnings({"unchecked", "DuplicatedCode"}) // TODO: get rid of duplications |
|
|
|
protected <PARENT extends Navigable, CHILD extends Navigable> List<CHILD> getChildren(@Nullable PARENT parent, @NonNull Class<CHILD> childClass) { |
|
|
|
if (childClass.equals(Season.class)) { |
|
|
|
return (List<CHILD>) getSeasonService().getAllSeasonsSorted(); |
|
|
@ -45,7 +43,7 @@ public class MatchdayNavigation extends Navigation { |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
@SuppressWarnings({"unchecked", "DuplicatedCode"}) |
|
|
|
@SuppressWarnings({"unchecked", "DuplicatedCode"}) // TODO: get rid of duplications |
|
|
|
protected <T extends Navigable> T getDefaultValue(Class<T> clazz) { |
|
|
|
if (clazz.equals(Season.class)) { |
|
|
|
assert !getSeasonList().isEmpty(); |
|
|
|