예제 #1
0
 /**
  * Compare two references by name.
  *
  * @param o1 the reference instance.
  * @param o2 the other reference instance.
  * @return standard Comparator result of < 0, 0, > 0.
  */
 public static int compareTo(final Ref o1, final Ref o2) {
   return o1.getName().compareTo(o2.getName());
 }
예제 #2
0
 /**
  * Compare a reference to a name.
  *
  * @param o1 the reference instance.
  * @param o2 the name to compare to.
  * @return standard Comparator result of < 0, 0, > 0.
  */
 public static int compareTo(Ref o1, String o2) {
   return o1.getName().compareTo(o2);
 }