Exemplo n.º 1
0
 @Override
 public int compare(VRMenuDef o1, VRMenuDef o2) {
   int x = Integer.compare(o1.getOrder(), o2.getOrder());
   if (x != 0) {
     return x;
   }
   return o1.getName().compareTo(o2.getName());
 }
Exemplo n.º 2
0
 public List<VRMenuDef> getChildren(String type) {
   List<VRMenuDef> all = new ArrayList<>();
   for (VRMenuDef c : children) {
     if (c.getType().equals(type)) {
       all.add(c);
     }
   }
   return all;
 }
Exemplo n.º 3
0
 public List<VRMenuDef> getLeaves() {
   List<VRMenuDef> all = new ArrayList<>();
   for (VRMenuDef c : children) {
     if (!c.getType().equals("package")) {
       all.add(c);
     }
   }
   Collections.sort(all, VR_MENU_DEF_COMPARATOR);
   return all;
 }