|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.commons.jexl3.internal.ArrayBuilder
public class ArrayBuilder
Helper class to create typed arrays.
Field Summary | |
---|---|
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 Summary | |
---|---|
ArrayBuilder(int size)
Creates a new builder. |
Method Summary | |
---|---|
void |
add(Object value)
Adds a literal to the array. |
Object |
create(boolean extended)
Creates the actual "array" instance. |
protected static Class<?> |
unboxingClass(Class<?> parm)
Gets the primitive type of a given class (when it exists). |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected Class<?> commonClass
protected boolean isNumber
protected boolean unboxing
protected final Object[] untyped
protected int added
Constructor Detail |
---|
public ArrayBuilder(int size)
size
- the exact array sizeMethod Detail |
---|
protected static Class<?> unboxingClass(Class<?> parm)
parm
- a class
public 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 ', ...'
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |