org.knime.base.node.preproc.setoperator
Enum SetOperation

java.lang.Object
  extended by java.lang.Enum<SetOperation>
      extended by org.knime.base.node.preproc.setoperator.SetOperation
All Implemented Interfaces:
Serializable, Comparable<SetOperation>, StringIconOption

public enum SetOperation
extends Enum<SetOperation>
implements StringIconOption

This enumeration contains all valid set operations.

Author:
Tobias Koetter, University of Konstanz

Enum Constant Summary
AND
          And operator.
MINUS
          Minus operator.
OR
          or operator.
XOR
          Xor operator.
 
Method Summary
 DataCell compute(DataCell cell1, DataCell cell2, boolean differentTypes)
           
 DataColumnSpec createResultColSpec(DataColumnSpec col1Spec, DataColumnSpec col2Spec)
           
 DataValueComparator getComparator(DataColumnSpec spec1, DataColumnSpec spec2)
           
static SetOperation getDefault()
           
 Icon getIcon()
          
 String getName()
           
static String[] getNameList()
           
static SetOperation getOperation4Name(String name)
           
 String getText()
          
static SetOperation valueOf(String name)
          Returns the enum constant of this type with the specified name.
static SetOperation[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

AND

public static final SetOperation AND
And operator.


OR

public static final SetOperation OR
or operator.


MINUS

public static final SetOperation MINUS
Minus operator.


XOR

public static final SetOperation XOR
Xor operator.

Method Detail

values

public static SetOperation[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (SetOperation c : SetOperation.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static SetOperation valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
IllegalArgumentException - if this enum type has no constant with the specified name
NullPointerException - if the argument is null

getName

public String getName()
Returns:
the name of the operation

getDefault

public static SetOperation getDefault()
Returns:
the default set operation

getOperation4Name

public static SetOperation getOperation4Name(String name)
Parameters:
name - the name to get the operation for
Returns:
the set operation with the given name

getNameList

public static String[] getNameList()
Returns:
a array with the name of all set operations

createResultColSpec

public DataColumnSpec createResultColSpec(DataColumnSpec col1Spec,
                                          DataColumnSpec col2Spec)
Parameters:
col1Spec - the column spec of the first set
col2Spec - the column spec of the second set
Returns:
the result column spec

getComparator

public DataValueComparator getComparator(DataColumnSpec spec1,
                                         DataColumnSpec spec2)
Parameters:
spec1 - the DataColumnSpec of the first set or null if the RowID is used
spec2 - the DataColumnSpec of the second set or null if the RowID is used
Returns:
the DataValueComparator to use

compute

public DataCell compute(DataCell cell1,
                        DataCell cell2,
                        boolean differentTypes)
Parameters:
cell1 - the member of the first set or null if it is a duplicate.
cell2 - the member of the second set or null if it is a duplicate.
differentTypes - true if both sets are of a different type
Returns:
the result of the combination. Could be null.

getIcon

public Icon getIcon()

Specified by:
getIcon in interface StringIconOption
Returns:
the Icon to render or null if no icon should be rendered

getText

public String getText()

Specified by:
getText in interface StringIconOption
Returns:
the label to render must not be null


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.