|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD |
java.lang.Objectjava.lang.Enum<AggregationMethod>
org.knime.base.node.preproc.groupby.aggregation.AggregationMethod
public enum AggregationMethod
Enumeration which lists all available aggregation methods including helper methods.
Enum Constant Summary | |
---|---|
CONCATENATE
Concatenates all cell values. |
|
COUNT
Counts the number of group members. |
|
FIRST
Takes the first cell per group. |
|
FIRST_VALUE
Takes the first value per group. |
|
LAST
Takes the last cell per group. |
|
LAST_VALUE
Takes the last value per group. |
|
LIST
List collection. |
|
MAX
Maximum. |
|
MEAN
Average. |
|
MIN
Minimum. |
|
MODE
Takes the value which occurs most. |
|
SET
Set collection. |
|
STD_DEVIATION
Standard deviation. |
|
SUM
Sum. |
|
UNIQUE_CONCATENATE
Concatenates all distinct cell values. |
|
UNIQUE_CONCATENATE_WITH_COUNT
Concatenates all distinct cell values and counts the members. |
|
UNIQUE_COUNT
Counts the number of unique group members. |
|
VARIANCE
Variance. |
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 |
---|
public static final AggregationMethod MIN
public static final AggregationMethod MAX
public static final AggregationMethod MEAN
public static final AggregationMethod SUM
public static final AggregationMethod VARIANCE
public static final AggregationMethod STD_DEVIATION
public static final AggregationMethod FIRST
public static final AggregationMethod FIRST_VALUE
public static final AggregationMethod LAST
public static final AggregationMethod LAST_VALUE
public static final AggregationMethod MODE
public static final AggregationMethod CONCATENATE
public static final AggregationMethod UNIQUE_CONCATENATE
public static final AggregationMethod UNIQUE_CONCATENATE_WITH_COUNT
public static final AggregationMethod UNIQUE_COUNT
public static final AggregationMethod COUNT
public static final AggregationMethod LIST
public static final AggregationMethod SET
Method Detail |
---|
public static AggregationMethod[] values()
for (AggregationMethod c : AggregationMethod.values()) System.out.println(c);
public static AggregationMethod valueOf(String name)
name
- the name of the enum constant to be returned.
IllegalArgumentException
- if this enum type has no constant
with the specified name
NullPointerException
- if the argument is nullpublic String getLabel()
public String getShortLabel()
public boolean isNumerical()
true
if only numerical columns are acceptedpublic AggregationOperator getOperator(DataColumnSpec origColSpec, int maxUniqueValues)
origColSpec
- the DataColumnSpec
of the original columnmaxUniqueValues
- the maximum number of unique values
public DataColumnSpec createColumnSpec(String colName, DataColumnSpec origSpec)
colName
- the name of the new columnorigSpec
- the original DataColumnSpec
should be kept
DataColumnSpecCreator
for the aggregated columnpublic boolean isUsesLimit()
true
if this method checks the maximum unique
values limit.public boolean isCompatible(DataColumnSpec colSpec)
colSpec
- the DataColumnSpec
to test for compatibility to
this AggregationMethod
true
if this method could be used to aggregation
the column with the given specificationpublic static AggregationMethod getAggregationMethod(DataColumnSpec colSpec, AggregationMethod numericColMethod, AggregationMethod nominalColMethod)
colSpec
- the DataColumnSpec
to checknumericColMethod
- the AggregationMethod
for
numerical columnsnominalColMethod
- the AggregationMethod
for none
numerical columns
AggregationMethod
to usepublic static List<AggregationMethod> getCompatibleMethods(DataColumnSpec colSpec)
colSpec
- the DataColumnSpec
to check
DataColumnSpec
public static AggregationMethod getDefaultMethod(DataColumnSpec spec)
spec
- the DataColumnSpec
to get the default method for
AggregationMethod
for the given column specpublic static AggregationMethod getDefaultNumericMethod()
public static AggregationMethod getDefaultNominalMethod()
public static AggregationMethod getMethod4SettingsModel(SettingsModelString model)
model
- the SettingsModelString
with the label of the
AggregationMethod
AggregationMethod
for the given labelpublic static AggregationMethod getMethod4Label(String label) throws IllegalArgumentException
label
- the label to get the AggregationMethod
for.
AggregationMethod
with the given label
IllegalArgumentException
- if no AggregationMethod
exists for the given labelpublic static List<String> getNumericalMethodLabels()
List
with the labels of all numerical methodspublic static List<String> getNoneNumericalMethodLabels()
List
with the labels of all none numerical methods
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD |