org.lastbamboo.common.download
Class LongRangeComparator

java.lang.Object
  extended by org.lastbamboo.common.download.LongRangeComparator
All Implemented Interfaces:
Comparator<org.apache.commons.lang.math.LongRange>

public class LongRangeComparator
extends Object
implements Comparator<org.apache.commons.lang.math.LongRange>

Comparator for ranking ranges. We preference the beginning of files, but this should also add some randomization so that not everyone ends up needing the same bytes at the end of the file.


Constructor Summary
LongRangeComparator()
           
 
Method Summary
 int compare(org.apache.commons.lang.math.LongRange range0, org.apache.commons.lang.math.LongRange range1)
           
 
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

LongRangeComparator

public LongRangeComparator()
Method Detail

compare

public int compare(org.apache.commons.lang.math.LongRange range0,
                   org.apache.commons.lang.math.LongRange range1)
Specified by:
compare in interface Comparator<org.apache.commons.lang.math.LongRange>


Copyright © 2013 LittleShoot. All Rights Reserved.