gov.nih.nlm.umls.meta
Class SourceElement.BySourceRestrictor

java.lang.Object
  extended bygov.nih.nlm.umls.meta.SourceElement.BySourceRestrictor
All Implemented Interfaces:
Comparator, Restrictor
Enclosing class:
SourceElement

public static final class SourceElement.BySourceRestrictor
extends Object
implements Restrictor


Constructor Summary
SourceElement.BySourceRestrictor(Source[] sources)
          Constructor Keep only sources given as parameter.
 
Method Summary
 int compare(Object o1, Object o2)
          Compares the Source of each SourceElement object.
 boolean keep(Object o)
          Returns whether or not the given SourceElement should be kept or not
 
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

SourceElement.BySourceRestrictor

public SourceElement.BySourceRestrictor(Source[] sources)
Constructor Keep only sources given as parameter.

Parameters:
sources - Source[]
Method Detail

compare

public int compare(Object o1,
                   Object o2)
Compares the Source of each SourceElement object.

Specified by:
compare in interface Comparator
Parameters:
o1 - the first Object to be compared.
o2 - the second Object to be compared.
Returns:
An int which might be negative integer, zero, or a positive integer as the first argument is less than, equal to, or greater than the second.

keep

public boolean keep(Object o)
Returns whether or not the given SourceElement should be kept or not

Specified by:
keep in interface Restrictor
Parameters:
o - Object
Returns:
boolean


Copyright ©2005