FileDocCategorySizeDatePackage
OpCountComparator.javaAPI DocJBoss 4.2.11587Fri Jul 13 21:02:16 BST 2007org.jboss.console.twiddle.command

OpCountComparator

public class OpCountComparator extends Object implements Comparator
A comparator that compares ops based on name and argument count.
author
Scott.Stark@jboss.org
version
$Revision: 57191 $

Fields Summary
Constructors Summary
Methods Summary
public intcompare(java.lang.Object o1, java.lang.Object o2)

      MBeanOp op1 = (MBeanOp) o1;
      MBeanOp op2 = (MBeanOp) o2;
      int compare = op1.getName().compareTo(op2.getName());
      if( compare == 0 )
         compare = op1.getArgCount() - op2.getArgCount();
      return compare;