TUM CCSM Commons

edu.tum.cs.commons.options
Class AOptionComparator

java.lang.Object
  extended by edu.tum.cs.commons.options.AOptionComparator
All Implemented Interfaces:
java.util.Comparator<AOption>

public class AOptionComparator
extends java.lang.Object
implements java.util.Comparator<AOption>

A comparator for ordering options in a way used for usage messages. Sorting is performed on the short name and then on the long name (if present). If the short name is missing, the long name is sorted into the short names.

Basically we just concatenate the short and long name and compare the resulting string.

Version:
$Rev: 26268 $
Author:
Benjamin Hummel, $Author: juergens $
Rating:
GREEN Hash: AE24BBB44D7ED7CD6DB789074D7E87C3

Constructor Summary
AOptionComparator()
           
 
Method Summary
 int compare(AOption o1, AOption o2)
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.util.Comparator
equals
 

Constructor Detail

AOptionComparator

public AOptionComparator()
Method Detail

compare

public int compare(AOption o1,
                   AOption o2)

Specified by:
compare in interface java.util.Comparator<AOption>

TUM CCSM Commons

TUM CCSM Commons - 2.7