de.smartics.exceptions.code
Class DefaultCodeComparator<T extends Code>

Package class diagram package DefaultCodeComparator
java.lang.Object
  extended by de.smartics.exceptions.code.DefaultCodeComparator<T>
Type Parameters:
T - the type of objects that may be compared by this comparator.
All Implemented Interfaces:
Serializable, Comparator<T>

public class DefaultCodeComparator<T extends Code>
     
     
extends Object
implements Comparator<T>, Serializable

The default code comparator compares the component and then the code by lexicographical order.

Author:
Robert Reiner
See Also:
Serialized Form

Constructor Summary
DefaultCodeComparator()
          Default constructor.
 
Method Summary
 int compare(T o1, T o2)
           Compares the component identifier and then the code itself.
 
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

DefaultCodeComparator

public DefaultCodeComparator()
Default constructor.

Method Detail

compare

public int compare(T o1,
                   T o2)

Compares the component identifier and then the code itself.

Specified by:
compare in interface Comparator<T extends Code>


Copyright © 2007-$2011 Kronseder & Reiner GmbH - smartics. All Rights Reserved.