1 |
41837
|
michele.ar
|
package eu.dnetlib.functionality.modular.ui;
|
2 |
|
|
|
3 |
|
|
import java.util.List;
|
4 |
|
|
|
5 |
41838
|
michele.ar
|
import org.apache.commons.lang3.math.NumberUtils;
|
6 |
41837
|
michele.ar
|
import org.springframework.beans.factory.annotation.Required;
|
7 |
|
|
|
8 |
|
|
public abstract class AbstractMenu implements Comparable<AbstractMenu> {
|
9 |
|
|
|
10 |
41838
|
michele.ar
|
private String title;
|
11 |
|
|
|
12 |
41837
|
michele.ar
|
abstract public int getOrder();
|
13 |
|
|
|
14 |
|
|
abstract public List<? extends MenuEntry> getEntries();
|
15 |
41838
|
michele.ar
|
|
16 |
41837
|
michele.ar
|
@Override
|
17 |
|
|
public int compareTo(final AbstractMenu menu) {
|
18 |
|
|
return NumberUtils.compare(getOrder(), menu.getOrder());
|
19 |
|
|
}
|
20 |
|
|
|
21 |
|
|
public String getTitle() {
|
22 |
41838
|
michele.ar
|
return this.title;
|
23 |
41837
|
michele.ar
|
}
|
24 |
41838
|
michele.ar
|
|
25 |
41837
|
michele.ar
|
@Required
|
26 |
41838
|
michele.ar
|
public void setTitle(final String title) {
|
27 |
41837
|
michele.ar
|
this.title = title;
|
28 |
|
|
}
|
29 |
|
|
}
|