org.knime.base.node.preproc.groupby.aggregation
Class Operators.LastOperator

java.lang.Object
  extended by org.knime.base.node.preproc.groupby.aggregation.AggregationOperator
      extended by org.knime.base.node.preproc.groupby.aggregation.Operators.LastOperator
Direct Known Subclasses:
Operators.LastValueOperator
Enclosing class:
Operators

 class Operators.LastOperator
extends AggregationOperator

Returns the last element per group.

Author:
Tobias Koetter, University of Konstanz

Field Summary
 
Fields inherited from class org.knime.base.node.preproc.groupby.aggregation.AggregationOperator
CONCATENATOR
 
Constructor Summary
Operators.LastOperator(int maxUniqueValues)
          Constructor for class MinOperator.
Operators.LastOperator(String label, boolean numerical, boolean usesLimit, boolean keepColSpec, int maxUniqueValues)
          Constructor for class LastOperator.
 
Method Summary
protected  boolean computeInternal(DataCell cell)
          
 AggregationOperator createInstance(DataColumnSpec origColSpec, int maxUniqueValues)
          Creates a new instance of this operator.
protected  DataType getDataType(DataType origType)
          
protected  DataCell getResultInternal()
          
protected  void resetInternal()
          Should reset the operator to the start values.
 
Methods inherited from class org.knime.base.node.preproc.groupby.aggregation.AggregationOperator
compute, createColumnSpec, getLabel, getMaxUniqueValues, getResult, getShortLabel, isNumerical, isSkipped, isUsesLimit, reset
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Operators.LastOperator

Operators.LastOperator(int maxUniqueValues)
Constructor for class MinOperator.

Parameters:
maxUniqueValues - the maximum number of unique values

Operators.LastOperator

public Operators.LastOperator(String label,
                              boolean numerical,
                              boolean usesLimit,
                              boolean keepColSpec,
                              int maxUniqueValues)
Constructor for class LastOperator.

Parameters:
label - user readable label
numerical - true if the operator is only suitable for numerical columns
usesLimit - true if the method checks the number of unique values limit.
keepColSpec - true if the original column specification should be kept if possible
maxUniqueValues - the maximum number of unique values
Method Detail

getDataType

protected DataType getDataType(DataType origType)

Specified by:
getDataType in class AggregationOperator
Parameters:
origType - the DataType of the original column to aggregate
Returns:
the DataType of the aggregation result

createInstance

public AggregationOperator createInstance(DataColumnSpec origColSpec,
                                          int maxUniqueValues)
Creates a new instance of this operator.

Specified by:
createInstance in class AggregationOperator
Parameters:
origColSpec - the DataColumnSpec of the original column
maxUniqueValues - the maximum number of unique values
Returns:
a new instance of this operator

computeInternal

protected boolean computeInternal(DataCell cell)

Specified by:
computeInternal in class AggregationOperator
Parameters:
cell - the DataCell to consider during computing the cell can't be null.
Returns:
true if this column should be skipped in further calculations

getResultInternal

protected DataCell getResultInternal()

Specified by:
getResultInternal in class AggregationOperator
Returns:
the result DataCell

resetInternal

protected void resetInternal()
Should reset the operator to the start values.

Specified by:
resetInternal in class AggregationOperator


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.