jd.xml.xslt.util
Class XsltSortable

java.lang.Object
  extended byjd.xml.xslt.util.XsltSortable
Direct Known Subclasses:
TemplateRule, WhitespaceTest

public class XsltSortable
extends Object

A XsltSortable represent an xslt element with a import precedence and priority.


Constructor Summary
XsltSortable(int importPrecedence)
          Create a XsltSortable.
XsltSortable(int importPrecedence, double priority)
          Create a XsltSortable.
XsltSortable(int importPrecedence, double priority, int serial)
          Create a XsltSortable.
XsltSortable(XsltSortable sortable)
          Create a XsltSortable by copying the values from another sortable.
 
Method Summary
 int compareTo(XsltSortable sortable)
          Compare the two XsltSortables.
 int getImportPrecedence()
          Return the import precedence.
static void sort(XsltSortable[] objects, int count)
          Sort the objects.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XsltSortable

public XsltSortable(int importPrecedence)
Create a XsltSortable.

Parameters:
importPrecedence - the precedence

XsltSortable

public XsltSortable(int importPrecedence,
                    double priority)
Create a XsltSortable.

Parameters:
importPrecedence - the precedence
priority - the priority

XsltSortable

public XsltSortable(int importPrecedence,
                    double priority,
                    int serial)
Create a XsltSortable.

Parameters:
importPrecedence - the precedence
priority - the priority
serial - the serial number of this object among the other objects of this kind.

XsltSortable

public XsltSortable(XsltSortable sortable)
Create a XsltSortable by copying the values from another sortable.

Method Detail

sort

public static void sort(XsltSortable[] objects,
                        int count)
Sort the objects. After sorting the object with highest precedence and priority comes first.


getImportPrecedence

public int getImportPrecedence()
Return the import precedence.


compareTo

public int compareTo(XsltSortable sortable)
Compare the two XsltSortables.