Package skyview.util

Class SmartIntArray


  • public class SmartIntArray
    extends java.lang.Object
    this class allows you to build an array as you go.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void add​(int i)
      add element (integer) to array , check size and increase it if necessary
      int[] toArray()
      trim array before return
      • Methods inherited from class java.lang.Object

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

      • SmartIntArray

        public SmartIntArray()
      • SmartIntArray

        public SmartIntArray​(int initialSize)
      • SmartIntArray

        public SmartIntArray​(int initialSize,
                             int growthSize)
    • Method Detail

      • add

        public void add​(int i)
        add element (integer) to array , check size and increase it if necessary
        Parameters:
        i - integer to add to array
      • toArray

        public int[] toArray()
        trim array before return
        Returns:
        trimmed array of integers