コード例 #1
0
 @Override
 public int compare(ElementNode n1, ElementNode n2) {
   if (n1.getDelegate() instanceof ClassMemberWithElement
       && n2.getDelegate() instanceof ClassMemberWithElement) {
     return ((ClassMemberWithElement) n1.getDelegate()).getElement().getTextOffset()
         - ((ClassMemberWithElement) n2.getDelegate()).getElement().getTextOffset();
   }
   return n1.getOrder() - n2.getOrder();
 }
コード例 #2
0
 @SuppressWarnings("unchecked")
 @Override
 public int compare(final ElementNode o1, final ElementNode o2) {
   return myDelegate.compare((T) o1.getDelegate(), (T) o2.getDelegate());
 }
コード例 #3
0
 @Override
 public int compare(ElementNode n1, ElementNode n2) {
   return n1.getDelegate().getText().compareToIgnoreCase(n2.getDelegate().getText());
 }