com.bigdata.rdf.model
Class TermIdComparator2

java.lang.Object
  extended by com.bigdata.rdf.model.TermIdComparator2
All Implemented Interfaces:
Comparator<Long>

public class TermIdComparator2
extends Object
implements Comparator<Long>

Compares Longs used to represent term identifiers, placing them into the same order as the id:terms index.

Version:
$Id: TermIdComparator2.java 2265 2009-10-26 12:51:06Z thompsonbry $
Author:
Bryan Thompson

Field Summary
static Comparator<Long> INSTANCE
           
 
Constructor Summary
TermIdComparator2()
           
 
Method Summary
 int compare(Long term1, Long term2)
          Note: comparison avoids possible overflow of long by not computing the difference directly.
 
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
 

Field Detail

INSTANCE

public static final transient Comparator<Long> INSTANCE
Constructor Detail

TermIdComparator2

public TermIdComparator2()
Method Detail

compare

public int compare(Long term1,
                   Long term2)
Note: comparison avoids possible overflow of long by not computing the difference directly.

Specified by:
compare in interface Comparator<Long>


Copyright © 2006-2009 SYSTAP, LLC. All Rights Reserved.