import eu.svjatoslav.commons.network.Locale;
import eu.svjatoslav.commons.string.WildCardMatcher;
-public class NavigationItem<NI extends NavigationItem, N extends Navigation> {
+public class NavigationItem<NI extends NavigationItem> {
private String matchingPattern;
private final Map<Locale, String> localeToTitle = new HashMap<Locale, String>();
private final ArrayList<NI> subElements = new ArrayList<NI>();
private final NI parent;
- private final N navigation;
+ private final Navigation<NI> navigation;
private final String linkUrl;
/**
* CSS prefix is inherited to child menu items.
*/
private String cssPrefix;
- public NavigationItem(final N navigation) {
+ public NavigationItem(final Navigation<NI> navigation) {
this.navigation = navigation;
parent = null;
matchingPattern = null;
public NavigationItem(final NI parent, final String linkUrl,
final String... titles) {
- this.navigation = (N) parent.getNavigation();
+ this.navigation = parent.getNavigation();
this.parent = parent;
this.linkUrl = linkUrl;
matchingPattern = linkUrl;
return null;
}
- public N getNavigation() {
+ public Navigation<NI> getNavigation() {
return navigation;
}