edu.tum.cs.commons.collections
Class IdComparator<I extends Comparable<I>,T>
java.lang.Object
edu.tum.cs.commons.collections.IdentifierBasedComparatorBase<I,T>
edu.tum.cs.commons.collections.IdComparator<I,T>
- All Implemented Interfaces:
- Comparator<T>
public class IdComparator<I extends Comparable<I>,T>
- extends IdentifierBasedComparatorBase<I,T>
Comparator that compares objects based on the identifiers provided by a
IIdProvider.
- Version:
- $Rev: 26283 $
- Author:
- deissenb, $Author: juergens $
- Rating:
- GREEN Hash: 3F2D6549B37B7E5FF4BC2F5E98EC0A29
|
Method Summary |
protected I |
obtainIdentifier(T t)
Obtain identifier from identifier provider. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
IdComparator
public IdComparator(IIdProvider<I,T> idProvider)
- Create new comparator.
obtainIdentifier
protected I obtainIdentifier(T t)
- Obtain identifier from identifier provider.
- Specified by:
obtainIdentifier in class IdentifierBasedComparatorBase<I extends Comparable<I>,T>
- Throws:
NullPointerException - if the id provider returns null.
TUM CCSM Commons - 2.7