Class PrefixDeploymentSorter

  extended by org.jboss.deployment.scanner.PrefixDeploymentSorter
All Implemented Interfaces:
Comparator, DefaultDeploymentSorter

public class PrefixDeploymentSorter
extends Object
implements Comparator, DefaultDeploymentSorter

This class is a comparator to sort deployment URLs based on the existence of a numeric prefix. The name portion of the URL is evaluated for any leading digits. If they exist, then they will define a numerical ordering for this comparator. If there is no leading digits, then they will compare as less than any name with leading digits. In the case of a tie, the DeploymentSorter is consulted (@see org.jboss.deployment.DeploymentSorter).

Ex.these names are in ascending order: test.sar, crap.ear, 001test.jar, 5test.rar, 5foo.jar, 120bar.jar

Constructor Summary
Method Summary
 int compare(Object o1, Object o2)
          As described in @see java.util.Comparator.
 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

Constructor Detail


public PrefixDeploymentSorter()
Method Detail


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


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


public int compare(Object o1,
                   Object o2)
As described in @see java.util.Comparator. This implements the comparison technique described above.

Specified by:
compare in interface Comparator

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