org.apache.nutch.crawl
Class UrlWithScore.UrlScoreComparator

java.lang.Object
  extended by org.apache.nutch.crawl.UrlWithScore.UrlScoreComparator
All Implemented Interfaces:
Comparator<UrlWithScore>, RawComparator<UrlWithScore>
Enclosing class:
UrlWithScore

public static final class UrlWithScore.UrlScoreComparator
extends Object
implements RawComparator<UrlWithScore>

Compares by {url,score}. Scores are sorted in descending order, that is from high scores to low.


Nested Class Summary
static class UrlWithScore.UrlScoreComparator.UrlOnlyComparator
          Compares by {url}.
 
Constructor Summary
UrlWithScore.UrlScoreComparator()
           
 
Method Summary
 int compare(byte[] b1, int s1, int l1, byte[] b2, int s2, int l2)
           
 int compare(UrlWithScore o1, UrlWithScore o2)
           
 
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

UrlWithScore.UrlScoreComparator

public UrlWithScore.UrlScoreComparator()
Method Detail

compare

public int compare(UrlWithScore o1,
                   UrlWithScore o2)
Specified by:
compare in interface Comparator<UrlWithScore>

compare

public int compare(byte[] b1,
                   int s1,
                   int l1,
                   byte[] b2,
                   int s2,
                   int l2)
Specified by:
compare in interface RawComparator<UrlWithScore>


Copyright © 2012 The Apache Software Foundation