Example #1
0
 public void listByName(PrintStream out) {
   ArrayList<MAPIProperty> all = new ArrayList<MAPIProperty>(MAPIProperty.getAll());
   Collections.sort(
       all,
       new Comparator<MAPIProperty>() {
         public int compare(MAPIProperty a, MAPIProperty b) {
           return a.name.compareTo(b.name);
         }
       });
   list(all, out);
 }
Example #2
0
 public void listById(PrintStream out) {
   ArrayList<MAPIProperty> all = new ArrayList<MAPIProperty>(MAPIProperty.getAll());
   Collections.sort(
       all,
       new Comparator<MAPIProperty>() {
         public int compare(MAPIProperty a, MAPIProperty b) {
           if (a.id < b.id) return -1;
           if (a.id > b.id) return +1;
           return 0;
         }
       });
   list(all, out);
 }