コード例 #1
0
ファイル: IntHeap.java プロジェクト: kennethxu/experiment
 /**
  * Sets the underlying array of the heap and set the size to be the length of given array.
  *
  * <p><i>Caution</i>: If the heap was heapified before this method call, it may become no longer
  * heapified.
  *
  * @param array the array to set
  * @return this object itself for fluent calls
  */
 public IntHeap setArray(int[] array) {
   this.array = Utils.argumentNotNull(array, "array");
   size = array.length;
   return this;
 }
コード例 #2
0
ファイル: IntHeap.java プロジェクト: kennethxu/experiment
 /**
  * Construct a zero size heap with given array as storage.
  *
  * @param array the array to be used as underlying heap storage
  */
 public IntHeap(final int[] array) {
   this.array = Utils.argumentNotNull(array, "array");
 }