1 21 22 package org.jacorb.notification.queue; 23 24 import java.util.Arrays ; 25 import java.util.Comparator ; 26 27 import EDU.oswego.cs.dl.util.concurrent.Heap; 28 29 33 class Heap2 extends Heap 34 { 35 40 public Heap2(int capacity, Comparator cmp) throws IllegalArgumentException 41 { 42 super(capacity, cmp); 43 } 44 45 48 public Heap2(int capacity) 49 { 50 super(capacity); 51 } 52 53 56 public synchronized void clear() 57 { 58 super.clear(); 59 60 for (int i = 0; i < nodes_.length && nodes_[i] != null; ++i) 61 { 62 nodes_[i] = null; 63 } 64 } 65 66 public String toString() 67 { 68 return Arrays.asList(nodes_).toString(); 69 } 70 } 71 | Popular Tags |