Class DoublePredefined

  • All Implemented Interfaces:
    java.lang.Iterable<GroupingExpression>

    public class DoublePredefined
    extends PredefinedFunction
    This class represents a predefined bucket-function in a GroupingExpression for expressions that evaluate to a double.
    Author:
    Simon Thoresen Hult
    • Constructor Detail

      • DoublePredefined

        public DoublePredefined​(GroupingExpression exp,
                                DoubleBucket arg1,
                                DoubleBucket... argN)
        Constructs a new instance of this class.
        Parameters:
        exp - The expression to evaluate, must evaluate to a double.
        arg1 - The compulsory bucket.
        argN - The optional buckets.
    • Method Detail

      • getBucket

        public DoubleBucket getBucket​(int i)
        Description copied from class: PredefinedFunction
        Returns the bucket at the given index.
        Overrides:
        getBucket in class PredefinedFunction
        Parameters:
        i - The index of the bucket to return.
        Returns:
        The bucket at the given index.
      • newInstance

        public static DoublePredefined newInstance​(GroupingExpression exp,
                                                   java.util.List<DoubleBucket> args)
        Constructs a new instance of this class from a list of arguments.
        Parameters:
        exp - The expression to evaluate, must evaluate to a double.
        args - The buckets to pass to the constructor.
        Returns:
        The created instance.
        Throws:
        java.lang.IllegalArgumentException - Thrown if the list of buckets is empty.