Package org.codehaus.staxmate.util
Class ArrayMaker
- java.lang.Object
-
- org.codehaus.staxmate.util.ArrayMaker
-
public class ArrayMaker extends java.lang.Object
Simple helper class used to create compact array presentations where the eventual size is not initially known.
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.Object[]
mData
private int
mLastIndex
-
Constructor Summary
Constructors Constructor Description ArrayMaker()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addEntry(int index, java.lang.Object value)
java.lang.Object[]
toArray(java.lang.Object[] result)
-
-
-
Method Detail
-
addEntry
public void addEntry(int index, java.lang.Object value)
-
toArray
public java.lang.Object[] toArray(java.lang.Object[] result)
- Parameters:
result
- Array in which results are to be added (if it's big enough); or if not big enough, one that indicates type of the array to create. If null, a generic Object[] is created, used and returned.
-
-