Class LongPredefined

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

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

      • LongPredefined

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

      • getBucket

        public LongBucket 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 LongPredefined newInstance​(GroupingExpression exp,
                                                 java.util.List<LongBucket> args)
        Constructs a new instance of this class from a list of arguments.
        Parameters:
        exp - The expression to evaluate, must evaluate to a long.
        args - The buckets to pass to the constructor.
        Returns:
        The created instance.
        Throws:
        java.lang.IllegalArgumentException - Thrown if the list of buckets is empty.