TC Java
2009 Version

gov.nih.nlm.nls.tc.Lib
Class Count1fComparator<T>

java.lang.Object
  extended by gov.nih.nlm.nls.tc.Lib.Count1fComparator<T>
All Implemented Interfaces:
java.util.Comparator<T>

public class Count1fComparator<T>
extends java.lang.Object
implements java.util.Comparator<T>

This class provides methods to compare Count1f records.

History:

Version:
V-2009
Author:
NLM Lexical Systems Group

Field Summary
static int BY_COUNT1
           
static int BY_NAME
           
 
Constructor Summary
Count1fComparator()
           
 
Method Summary
 int compare(T o1, T o2)
          This method compare two Count1f objects by the specified compare flag.
 void SetCompareFlag(int flag)
          Set the comparing flag
 
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

BY_NAME

public static final int BY_NAME
See Also:
Constant Field Values

BY_COUNT1

public static final int BY_COUNT1
See Also:
Constant Field Values
Constructor Detail

Count1fComparator

public Count1fComparator()
Method Detail

compare

public int compare(T o1,
                   T o2)
This method compare two Count1f objects by the specified compare flag.

Specified by:
compare in interface java.util.Comparator<T>
Parameters:
o1 - the first Count1f object to be compared
o2 - the second Count1f object to be compared
Returns:
a negative interger, zero, or a positive integer as the first argument is less than, equal to, or greater than the second.

SetCompareFlag

public void SetCompareFlag(int flag)
Set the comparing flag

Parameters:
flag - comparing flag: BY_NAME|BY_COUNT1

TC Java
2009 Version

Submit a bug or feature

Copyright © 2009 National Library of Medicine