diff -r bb4c52bf3439 -r f64255a88d66 src/main/java/de/uapcore/lightpit/MenuEntry.java --- a/src/main/java/de/uapcore/lightpit/MenuEntry.java Sat May 23 13:52:04 2020 +0200 +++ b/src/main/java/de/uapcore/lightpit/MenuEntry.java Sat May 23 14:13:09 2020 +0200 @@ -28,16 +28,7 @@ */ package de.uapcore.lightpit; -import java.util.Objects; - -/** - * Maps a resource key for the menu label to the path name for the underlying - * site. - *

- * Objects of this class are internally instantiated by the - * {@link ModuleManager}. - */ -public class MenuEntry implements Comparable { +public class MenuEntry { /** * Resource key for the menu label. @@ -55,27 +46,20 @@ private final String pathName; /** - * Sequence number to determine the ordering of the menu. - */ - private final int sequence; - - /** * True if this menu entry is active. */ private boolean active = false; - public MenuEntry(ResourceKey resourceKey, String pathName, int sequence) { + public MenuEntry(ResourceKey resourceKey, String pathName) { this.text = null; this.resourceKey = resourceKey; this.pathName = pathName; - this.sequence = sequence; } - public MenuEntry(String text, String pathName, int sequence) { + public MenuEntry(String text, String pathName) { this.text = text; this.resourceKey = null; this.pathName = pathName; - this.sequence = sequence; } public ResourceKey getResourceKey() { @@ -90,10 +74,6 @@ return pathName; } - public int getSequence() { - return sequence; - } - public boolean isActive() { return this.active; } @@ -102,22 +82,4 @@ this.active = true; } - @Override - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - MenuEntry menuEntry = (MenuEntry) o; - return resourceKey.equals(menuEntry.resourceKey) && - pathName.equals(menuEntry.pathName); - } - - @Override - public int hashCode() { - return Objects.hash(resourceKey, pathName); - } - - @Override - public int compareTo(MenuEntry menuEntry) { - return Integer.compare(this.sequence, menuEntry.sequence); - } }