package priorityqueues; import java.util.List; /** * An implementation of AbstractHeapMinPQAssert that extracts the proper fields from an * ArrayHeapMinPQ implementation. */ public class ArrayHeapMinPQAssert extends AbstractHeapMinPQAssert { public ArrayHeapMinPQAssert(ArrayHeapMinPQ actual) { super(actual, ArrayHeapMinPQAssert.class); } @Override protected int extractStartIndex(ExtrinsicMinPQ actual) { return ArrayHeapMinPQ.START_INDEX; } @Override protected List> extractHeap(ExtrinsicMinPQ actual) { return ((ArrayHeapMinPQ) actual).items; } }