org.jboss.deployment.scanner
Class AlphaNumericDeploymentSorter

java.lang.Object
  extended by org.jboss.deployment.scanner.AlphaNumericDeploymentSorter
All Implemented Interfaces:
Comparator, DefaultDeploymentSorter

public class AlphaNumericDeploymentSorter
extends Object
implements Comparator, DefaultDeploymentSorter

This is simialr to the PrefixDeploymentSorter in that it will order files that do not start with a numeric value before those that do. If two files begin with a number, will compare the numeric values. However, if the two files do not have numeric prefixes, will compare them using compareToIgnoreCase.

Author:
Tom Elrod

Constructor Summary
AlphaNumericDeploymentSorter()
           
 
Method Summary
 int alphaCompare(Object o1, Object o2)
           
 int compare(Object o1, Object o2)
           
 String[] getSuffixOrder()
           
 void setSuffixOrder(String[] suffixOrder)
           
 
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

AlphaNumericDeploymentSorter

public AlphaNumericDeploymentSorter()
Method Detail

getSuffixOrder

public String[] getSuffixOrder()
Specified by:
getSuffixOrder in interface DefaultDeploymentSorter

setSuffixOrder

public void setSuffixOrder(String[] suffixOrder)
Specified by:
setSuffixOrder in interface DefaultDeploymentSorter

compare

public int compare(Object o1,
                   Object o2)
Specified by:
compare in interface Comparator

alphaCompare

public int alphaCompare(Object o1,
                        Object o2)


Copyright © 2002 JBoss Group, LLC. All Rights Reserved.