Interface Feature
public interface Feature
A feature in the formula once bound to a schema. A feature returns a single value
when applied to a data object (e.g. Tuple).
-
Method Summary
Modifier and TypeMethodDescriptiondefault ValueVectorApplies the term on a data frame.Applies the term on a tuple.default booleanapplyAsBoolean(Tuple tuple) Applies the term on a data object and produces a boolean-valued result.default byteapplyAsByte(Tuple tuple) Applies the term on a data object and produces a byte-valued result.default charapplyAsChar(Tuple tuple) Applies the term on a data object and produces a char-valued result.default BigDecimalapplyAsDecimal(Tuple tuple) Applies the term on a data object and produces a decimal-valued result.default doubleapplyAsDouble(Tuple tuple) Applies the term on a data object and produces a double-valued result.default floatapplyAsFloat(Tuple tuple) Applies the term on a data object and produces a float-valued result.default intapplyAsInt(Tuple tuple) Applies the term on a data object and produces an int-valued result.default longapplyAsLong(Tuple tuple) Applies the term on a data object and produces a long-valued result.default shortapplyAsShort(Tuple tuple) Applies the term on a data object and produces a short-valued result.default StringapplyAsString(Tuple tuple) Applies the term on a data object and produces a string-valued result.field()Returns the metadata of feature.default booleanReturns true if the term represents a plain variable/column in the data frame.
-
Method Details
-
field
-
apply
-
applyAsDouble
Applies the term on a data object and produces a double-valued result.- Parameters:
tuple- the input tuple.- Returns:
- the feature value.
-
applyAsFloat
Applies the term on a data object and produces a float-valued result.- Parameters:
tuple- the input tuple.- Returns:
- the feature value.
-
applyAsInt
Applies the term on a data object and produces an int-valued result.- Parameters:
tuple- the input tuple.- Returns:
- the feature value.
-
applyAsLong
Applies the term on a data object and produces a long-valued result.- Parameters:
tuple- the input tuple- Returns:
- the feature value.
-
applyAsBoolean
Applies the term on a data object and produces a boolean-valued result.- Parameters:
tuple- the input tuple.- Returns:
- the feature value.
-
applyAsByte
Applies the term on a data object and produces a byte-valued result.- Parameters:
tuple- the input tuple.- Returns:
- the feature value.
-
applyAsShort
Applies the term on a data object and produces a short-valued result.- Parameters:
tuple- the input tuple.- Returns:
- the feature value.
-
applyAsChar
Applies the term on a data object and produces a char-valued result.- Parameters:
tuple- the input tuple.- Returns:
- the feature value.
-
applyAsString
-
applyAsDecimal
Applies the term on a data object and produces a decimal-valued result.- Parameters:
tuple- the input tuple.- Returns:
- the feature value.
-
isVariable
default boolean isVariable()Returns true if the term represents a plain variable/column in the data frame.- Returns:
- true if the term represents a plain variable/column in the data frame.
-
apply
Applies the term on a data frame.- Parameters:
data- the data frame.- Returns:
- the feature vector.
-