org.merlotxml.util.xml
Class GrammarComplexType.ListComparator

java.lang.Object
  extended byorg.merlotxml.util.xml.GrammarComplexType.ListComparator
All Implemented Interfaces:
java.util.Comparator
Enclosing class:
GrammarComplexType

protected class GrammarComplexType.ListComparator
extends java.lang.Object
implements java.util.Comparator

Sorts objects according to their positions in another list.

Author:
everth

Field Summary
 java.util.List list
           
 
Constructor Summary
GrammarComplexType.ListComparator(java.util.List list)
          Constructor for the ListComparator object
 
Method Summary
 int compare(java.lang.Object o1, java.lang.Object o2)
           
 boolean equals(java.lang.Object obj)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

list

public java.util.List list
Constructor Detail

GrammarComplexType.ListComparator

public GrammarComplexType.ListComparator(java.util.List list)
Constructor for the ListComparator object

Parameters:
list - Description of Parameter
Method Detail

compare

public int compare(java.lang.Object o1,
                   java.lang.Object o2)
            throws java.lang.ClassCastException
Specified by:
compare in interface java.util.Comparator
Throws:
java.lang.ClassCastException

equals

public boolean equals(java.lang.Object obj)
Specified by:
equals in interface java.util.Comparator