org.apache.cassandra.cql3.functions

## Class AbstractFunction

- java.lang.Object
- - org.apache.cassandra.cql3.functions.AbstractFunction

All Implemented Interfaces:
  AssignmentTestable, Function

Direct Known Subclasses:
  NativeFunction, UDAggregate, UDFunction

    public abstract class AbstractFunction
    extends java.lang.Object
    implements Function

Base class for our native/hardcoded functions.

### Nested Class Summary

### Nested classes/interfaces inherited from interface org.apache.cassandra.cql3.AssignmentTestable

`AssignmentTestable.TestResult`

### Field Summary

Fields
`protected java.util.List<AbstractType<?>>` `argTypes`
`protected FunctionName` `name`
`protected AbstractType<?>` `returnType`

### Constructor Summary

Constructors
`protected` `AbstractFunction(FunctionName name, java.util.List<AbstractType<?>> argTypes, AbstractType<?> returnType)`

### Method Summary

All Methods Instance Methods Concrete Methods
`void` `addFunctionsTo(java.util.List<Function> functions)`
`java.util.List<AbstractType<?>>` `argTypes()`
`java.lang.String` `columnName(java.util.List<java.lang.String> columnNames)` Returns the name of the function to use within a ResultSet.
`boolean` `equals(java.lang.Object o)`
`int` `hashCode()`
`boolean` `hasReferenceTo(Function function)`
`FunctionName` `name()`
`AbstractType<?>` `returnType()`
`AssignmentTestable.TestResult` `testAssignment(java.lang.String keyspace, ColumnSpecification receiver)`
`java.lang.String` `toString()`

### Methods inherited from class java.lang.Object

`clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

### Methods inherited from interface org.apache.cassandra.cql3.functions.Function

`isAggregate, isNative`

### Field Detail

#### name

    protected final FunctionName name

#### argTypes

    protected final java.util.List<AbstractType<?>> argTypes

#### returnType

    protected final AbstractType<?> returnType

### Constructor Detail

#### AbstractFunction

    protected AbstractFunction(FunctionName name,
                               java.util.List<AbstractType<?>> argTypes,
                               AbstractType<?> returnType)

### Method Detail

#### name

    public FunctionName name()

Specified by:
  `name` in interface `Function`

#### argTypes

    public java.util.List<AbstractType<?>> argTypes()

Specified by:
  `argTypes` in interface `Function`

#### returnType

    public AbstractType<?> returnType()

Specified by:
  `returnType` in interface `Function`

#### equals

    public boolean equals(java.lang.Object o)

Overrides:
  `equals` in class `java.lang.Object`

#### addFunctionsTo

    public void addFunctionsTo(java.util.List<Function> functions)

Specified by:
  `addFunctionsTo` in interface `Function`

#### hasReferenceTo

    public boolean hasReferenceTo(Function function)

Specified by:
  `hasReferenceTo` in interface `Function`

#### hashCode

    public int hashCode()

Overrides:
  `hashCode` in class `java.lang.Object`

#### testAssignment

    public final AssignmentTestable.TestResult testAssignment(java.lang.String keyspace,
                                                              ColumnSpecification receiver)

Specified by:
  `testAssignment` in interface `AssignmentTestable`
Returns:
  whether this object can be assigned to the provided receiver. We distinguish between 3 values: - EXACT_MATCH if this object is exactly of the type expected by the receiver - WEAKLY_ASSIGNABLE if this object is not exactly the expected type but is assignable nonetheless - NOT_ASSIGNABLE if it's not assignable Most caller should just call the isAssignable() method on the result, though functions have a use for testing "strong" equality to decide the most precise overload to pick when multiple could match.

#### toString

    public java.lang.String toString()

Overrides:
  `toString` in class `java.lang.Object`

#### columnName

    public java.lang.String columnName(java.util.List<java.lang.String> columnNames)

Description copied from interface: `Function`
Returns the name of the function to use within a ResultSet.

Specified by:
  `columnName` in interface `Function`
Parameters:
  `columnNames` - the names of the columns used to call the function
Returns:
  the name of the function to use within a ResultSet