Code example for Vector

Methods: elementAtsetElementAt

     * @param i 
     * @param j 
    private void swap(int i, int j)
        T iElt = heap.elementAt(i);
        T jElt = heap.elementAt(j);
        heap.setElementAt(jElt, i);
        object_indices.put(jElt, new Integer(i));
        heap.setElementAt(iElt, j);
        object_indices.put(iElt, new Integer(j));
     * Comparator used if none is specified in the constructor. 
     * @author Joshua O'Madadhain 
    private class ComparableComparator implements Comparator<T>
Experience pair programming with AI  Get Codota for Java