org.apache.cassandra.cql3.functions

## Class UDAggregate

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

All Implemented Interfaces:
  AssignmentTestable, AggregateFunction, Function

    public class UDAggregate
    extends AbstractFunction
    implements AggregateFunction

Base class for user-defined-aggregates.

### Nested Class Summary

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

`AggregateFunction.Aggregate`

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

`AssignmentTestable.TestResult`

### Field Summary

Fields
`protected java.nio.ByteBuffer` `initcond`
`protected static org.slf4j.Logger` `logger`

### Fields inherited from class org.apache.cassandra.cql3.functions.AbstractFunction

`argTypes, name, returnType`

### Constructor Summary

Constructors
Constructor and Description
`UDAggregate(FunctionName name, java.util.List<AbstractType<?>> argTypes, AbstractType<?> returnType, ScalarFunction stateFunc, ScalarFunction finalFunc, java.nio.ByteBuffer initcond)`

### Method Summary

All Methods Static Methods Instance Methods Concrete Methods
`void` `addFunctionsTo(java.util.List<Function> functions)`
`static UDAggregate` `create(Functions functions, FunctionName name, java.util.List<AbstractType<?>> argTypes, AbstractType<?> returnType, FunctionName stateFunc, FunctionName finalFunc, AbstractType<?> stateType, java.nio.ByteBuffer initcond)`
`static UDAggregate` `createBroken(FunctionName name, java.util.List<AbstractType<?>> argTypes, AbstractType<?> returnType, java.nio.ByteBuffer initcond, InvalidRequestException reason)`
`boolean` `equals(java.lang.Object o)`
`ScalarFunction` `finalFunction()`
`int` `hashCode()`
`boolean` `hasReferenceTo(Function function)`
`java.nio.ByteBuffer` `initialCondition()`
`boolean` `isAggregate()` Checks whether the function is an aggregate function or not.
`boolean` `isNative()` Checks whether the function is a native/hard coded one or not.
`AggregateFunction.Aggregate` `newAggregate()` Creates a new `Aggregate` instance.
`ScalarFunction` `stateFunction()`
`AbstractType<?>` `stateType()`

### Methods inherited from class org.apache.cassandra.cql3.functions.AbstractFunction

`argTypes, columnName, name, returnType, testAssignment, 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

`argTypes, columnName, name, returnType`

### Methods inherited from interface org.apache.cassandra.cql3.AssignmentTestable

`testAssignment`

### Field Detail

#### logger

    protected static final org.slf4j.Logger logger

#### initcond

    protected final java.nio.ByteBuffer initcond

### Constructor Detail

#### UDAggregate

    public UDAggregate(FunctionName name,
                       java.util.List<AbstractType<?>> argTypes,
                       AbstractType<?> returnType,
                       ScalarFunction stateFunc,
                       ScalarFunction finalFunc,
                       java.nio.ByteBuffer initcond)

### Method Detail

#### create

    public static UDAggregate create(Functions functions,
                                     FunctionName name,
                                     java.util.List<AbstractType<?>> argTypes,
                                     AbstractType<?> returnType,
                                     FunctionName stateFunc,
                                     FunctionName finalFunc,
                                     AbstractType<?> stateType,
                                     java.nio.ByteBuffer initcond)
                              throws InvalidRequestException

Throws:
  `InvalidRequestException`

#### createBroken

    public static UDAggregate createBroken(FunctionName name,
                                           java.util.List<AbstractType<?>> argTypes,
                                           AbstractType<?> returnType,
                                           java.nio.ByteBuffer initcond,
                                           InvalidRequestException reason)

#### hasReferenceTo

    public boolean hasReferenceTo(Function function)

Specified by:
  `hasReferenceTo` in interface `Function`
Overrides:
  `hasReferenceTo` in class `AbstractFunction`

#### addFunctionsTo

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

Specified by:
  `addFunctionsTo` in interface `Function`
Overrides:
  `addFunctionsTo` in class `AbstractFunction`

#### isAggregate

    public boolean isAggregate()

Description copied from interface: `Function`
Checks whether the function is an aggregate function or not.

Specified by:
  `isAggregate` in interface `Function`
Returns:
  `true` if the function is an aggregate function, `false` otherwise.

#### isNative

    public boolean isNative()

Description copied from interface: `Function`
Checks whether the function is a native/hard coded one or not.

Specified by:
  `isNative` in interface `Function`
Returns:
  `true` if the function is a native/hard coded one, `false` otherwise.

#### stateFunction

    public ScalarFunction stateFunction()

#### finalFunction

    public ScalarFunction finalFunction()

#### initialCondition

    public java.nio.ByteBuffer initialCondition()

#### stateType

    public AbstractType<?> stateType()

#### newAggregate

    public AggregateFunction.Aggregate newAggregate()
                                             throws InvalidRequestException

Description copied from interface: `AggregateFunction`
Creates a new `Aggregate` instance.

Specified by:
  `newAggregate` in interface `AggregateFunction`
Returns:
  a new `Aggregate` instance.
Throws:
  `InvalidRequestException`

#### equals

    public boolean equals(java.lang.Object o)

Overrides:
  `equals` in class `AbstractFunction`

#### hashCode

    public int hashCode()

Overrides:
  `hashCode` in class `AbstractFunction`