org.apache.nutch.db
Class WebDBWriter.LinkInstruction.UrlComparator
java.lang.Object
org.apache.nutch.io.WritableComparator
org.apache.nutch.db.WebDBWriter.LinkInstruction.UrlComparator
- All Implemented Interfaces:
- Comparator
- Enclosing class:
- WebDBWriter.LinkInstruction
- public static class WebDBWriter.LinkInstruction.UrlComparator
- extends WritableComparator
Sorts the instruction first by url, then by opcode.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
WebDBWriter.LinkInstruction.UrlComparator
public WebDBWriter.LinkInstruction.UrlComparator()
compare
public int compare(WritableComparable a,
WritableComparable b)
- Description copied from class:
WritableComparator
- Compare two WritableComparables.
The default implementation uses the natural ordering, calling Comparable.compareTo(Object)
.
- Overrides:
compare
in class WritableComparator
compare
public int compare(byte[] b1,
int s1,
int l1,
byte[] b2,
int s2,
int l2)
- Optimized comparator.
- Overrides:
compare
in class WritableComparator
Copyright © 2006 The Apache Software Foundation