org.knime.base.node.viz.histogram.impl.interactive
Class RowByColumnComparator

java.lang.Object
  extended by org.knime.base.node.viz.histogram.impl.interactive.RowByColumnComparator
All Implemented Interfaces:
Comparator<DataRow>

public class RowByColumnComparator
extends Object
implements Comparator<DataRow>

Comparator used to sort DataRows by the value of the row with the given index.

Author:
Tobias Koetter, University of Konstanz

Constructor Summary
RowByColumnComparator(int colIndx, DataValueComparator cellComp)
          Constructor for class RowByColumnComparator.
 
Method Summary
 int compare(DataRow o1, DataRow o2)
           
 DataValueComparator getBasicComparator()
           
 
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

RowByColumnComparator

public RowByColumnComparator(int colIndx,
                             DataValueComparator cellComp)
Constructor for class RowByColumnComparator.

Parameters:
colIndx - the index of the column which should be used to compare the given DataRow objects
cellComp - the DataValueComparator used to compare the cells of the column with the given index
Method Detail

getBasicComparator

public DataValueComparator getBasicComparator()
Returns:
the DataValueComparator used to compare the cells with the index set in the constructor

compare

public int compare(DataRow o1,
                   DataRow o2)
Specified by:
compare in interface Comparator<DataRow>
Parameters:
o1 - row 1
o2 - row 2
Returns:
the result of the default comparator for the table cell with index set in the constructor


Copyright, 2003 - 2010. All rights reserved.
University of Konstanz, Germany.
Chair for Bioinformatics and Information Mining, Prof. Dr. Michael R. Berthold.
You may not modify, publish, transmit, transfer or sell, reproduce, create derivative works from, distribute, perform, display, or in any way exploit any of the content, in whole or in part, except as otherwise expressly permitted in writing by the copyright owner or as specified in the license file distributed with this product.