Lvg Java
2006p Version

gov.nih.nlm.nls.lvg.Db
Class FruitfulComparator

java.lang.Object
  extended by gov.nih.nlm.nls.lvg.Db.FruitfulComparator
All Implemented Interfaces:
java.util.Comparator

public class FruitfulComparator
extends java.lang.Object
implements java.util.Comparator

This class provides methods to compare fruitful records.

History:

Version:
V-2006p
Author:
NLM NLS Development Team
See Also:
FruitfulRecord

Constructor Summary
FruitfulComparator()
           
 
Method Summary
 int compare(java.lang.Object o1, java.lang.Object o2)
          Compare two object o1 and 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

FruitfulComparator

public FruitfulComparator()
Method Detail

compare

public int compare(java.lang.Object o1,
                   java.lang.Object o2)
Compare two object o1 and o2. Both objects o1 and o2 are FruitfulRecord. The compare algorithm uses distance and then alphabetic order

Specified by:
compare in interface java.util.Comparator
Parameters:
o1 - first object to be compared
o2 - second object to be compared
Returns:
a negative integer, 0, or positive integer to represent the object o1 is less, equals, or greater than object 02.

Lvg Java
2006p Version

Submit a bug or feature

Copyright © 2006p National Library of Medicine