Exemple #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());
 }
Exemple #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;
 }
Exemple #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;
 }