Class StringPredefined

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

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

      • StringPredefined

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

      • getBucket

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