TC Java
2011 Version

gov.nih.nlm.nls.tc.Sti
Class Count2fStComparator<T>

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

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

This class provides methods to compare St Score records (Count2f).

History:

Version:
V-2011
Author:
NLM Lexical Systems Group

Field Summary
static int BY_ABBR
           
static int BY_COUNT1
           
static int BY_COUNT2
           
static int BY_DC
           
static int BY_DC_ABBR
           
static int BY_TUI
           
static int BY_WC
           
static int BY_WC_ABBR
           
 
Constructor Summary
Count2fStComparator()
           
 
Method Summary
 int compare(T o1, T o2)
          This method compares two Count2f ST scores objects by the specified compare flag.
 void SetCompareFlag(int flag)
          Set the comparing flag
 void SetSemanticTypes(SemanticTypes sts)
          Set the Semantic Types
 void SetVerbose(boolean verbose)
          Set verbose flag for reading in ST file
 
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_TUI

public static final int BY_TUI
See Also:
Constant Field Values

BY_ABBR

public static final int BY_ABBR
See Also:
Constant Field Values

BY_WC

public static final int BY_WC
See Also:
Constant Field Values

BY_COUNT1

public static final int BY_COUNT1
See Also:
Constant Field Values

BY_DC

public static final int BY_DC
See Also:
Constant Field Values

BY_COUNT2

public static final int BY_COUNT2
See Also:
Constant Field Values

BY_WC_ABBR

public static final int BY_WC_ABBR
See Also:
Constant Field Values

BY_DC_ABBR

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

Count2fStComparator

public Count2fStComparator()
Method Detail

SetSemanticTypes

public void SetSemanticTypes(SemanticTypes sts)
Set the Semantic Types

Parameters:
sts - Semantic Types

SetVerbose

public void SetVerbose(boolean verbose)
Set verbose flag for reading in ST file

Parameters:
verbose - verbose flag for reading in ST file

SetCompareFlag

public void SetCompareFlag(int flag)
Set the comparing flag

Parameters:
flag - comparing flag: BY_ID|BY_ABBR|BY_WC|BY_COUNT1|BY_DC|BY_COUNT2|BY_WC_ABBR|BY_DC_ABBR

compare

public int compare(T o1,
                   T o2)
This method compares two Count2f ST scores objects by the specified compare flag.

Specified by:
compare in interface java.util.Comparator<T>
Parameters:
o1 - the first Count2f object to be compared
o2 - the second Count2f 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.

TC Java
2011 Version

Submit a bug or feature

Copyright © 2011 National Library of Medicine