peakml
Class IPeak.AnnotationDescending

java.lang.Object
  extended by peakml.IPeak.AnnotationDescending
All Implemented Interfaces:
java.util.Comparator<IPeak>
Enclosing class:
IPeak

public static class IPeak.AnnotationDescending
extends java.lang.Object
implements java.util.Comparator<IPeak>

Comparator for sorting on a vector of peaks on an annotations. The comparator has knowledge of the basic types Annotation.ValueType.INTEGER and Annotation.ValueType.DOUBLE. The string representation of these types is automatically converted and used to sort.


Constructor Summary
IPeak.AnnotationDescending(java.lang.String label)
          Constructs a new instance, which sorts on the given label.
 
Method Summary
 int compare(IPeak arg0, IPeak arg1)
          Compare function, which converts the data in the IPeak instances to comparable data and sorts accordingly.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.util.Comparator
equals
 

Constructor Detail

IPeak.AnnotationDescending

public IPeak.AnnotationDescending(java.lang.String label)
Constructs a new instance, which sorts on the given label.

Parameters:
label - The label of the annotation to sort on.
Method Detail

compare

public int compare(IPeak arg0,
                   IPeak arg1)
Compare function, which converts the data in the IPeak instances to comparable data and sorts accordingly.

Specified by:
compare in interface java.util.Comparator<IPeak>
Parameters:
arg0 - The first argument.
arg1 - The second argument.