Interface JexlArithmetic.ArrayBuilder

  • All Known Implementing Classes:
    ArrayBuilder
    Enclosing class:
    JexlArithmetic

    public static interface JexlArithmetic.ArrayBuilder
    Helper interface used when creating an array literal.

    The default implementation creates an array and attempts to type it strictly.

    • If all objects are of the same type, the array returned will be an array of that same type
    • If all objects are Numbers, the array returned will be an array of Numbers
    • If all objects are convertible to a primitive type, the array returned will be an array of the primitive type
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void add​(java.lang.Object value)
      Adds a literal to the array.
      java.lang.Object create​(boolean extended)
      Creates the actual "array" instance.
    • Method Detail

      • add

        void add​(java.lang.Object value)
        Adds a literal to the array.
        Parameters:
        value - the item to add
      • create

        java.lang.Object create​(boolean extended)
        Creates the actual "array" instance.
        Parameters:
        extended - true when the last argument is ', ...'
        Returns:
        the array