public class ArrayBuilder extends Object implements JexlArithmetic.ArrayBuilder
Modifier and Type | Field and Description |
---|---|
protected int |
added
Number of added items.
|
protected Class<?> |
commonClass
The intended class array.
|
protected boolean |
isNumber
Whether the array stores numbers.
|
protected boolean |
unboxing
Whether we can try unboxing.
|
protected Object[] |
untyped
The untyped list of items being added.
|
Constructor and Description |
---|
ArrayBuilder(int size)
Creates a new builder.
|
protected Class<?> commonClass
protected boolean isNumber
protected boolean unboxing
protected final Object[] untyped
protected int added
public ArrayBuilder(int size)
size
- the exact array sizeprotected static Class<?> unboxingClass(Class<?> parm)
parm
- a classpublic void add(Object value)
JexlArithmetic.ArrayBuilder
add
in interface JexlArithmetic.ArrayBuilder
value
- the item to addpublic Object create(boolean extended)
JexlArithmetic.ArrayBuilder
create
in interface JexlArithmetic.ArrayBuilder
extended
- true when the last argument is ', ...'Copyright © 2001–2015 The Apache Software Foundation. All rights reserved.