Class 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)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • mData

        private java.lang.Object[] mData
      • mLastIndex

        private int mLastIndex
    • Constructor Detail

      • ArrayMaker

        public ArrayMaker()
    • 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.