@Override
    protected Object execute(Object data, State state) {
        if (data == null) {
            return 0;
        }
        if (!(data instanceof Set)) {
            throw new SiddhiAppRuntimeException("Input to sizeOfSet() function should be an instance of " +
                    "java.util.Set, but found " + data.getClass().getCanonicalName());
        }
        Set set = (Set) data;
        return set.size();
    }
return maximum of arbitrary long set of Double values

@param data  array of Double values
@param state
@return max
modules/siddhi-core/src/main/java/io/siddhi/core/executor/function/SizeOfSetFunctionExecutor.java