/*
This file is part of the algoviz@vt collection of algorithm
visualizations.
This program is free software: you can redistribute it and/or
modify it under the terms of the GNU General Public License as
published by the Free Software Foundation, either version 3
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this distribution. If not, see
.
*/
package avl;
/**
* @author Andrew
*/
public interface DictionaryADT
{
/**
* Reinitialize dictionary
*/
void clear();
/**
* Insert e into the dictionary
*
* @param k The key for this element.
* @param e The element to insert.
*/
void insert(Key k, Elem e);
/**
* Removes an element from the dictionary. This is different from Dr.
* Shaffer's C++ prototype, since an object cannot be passed back via a
* parameter in Java.
*
* @param k The specified value associated with this key will be removed.
* @return Non-NULL if the removal was successful, NULL if it was
* unsuccessful.
*/
Elem remove(Key k);
/**
* This method differs in the same way that the remove method differs from
* the C++ version of the BST. Finds the element corresponding to k and
* returns it
*
* @param k The key to look up.
* @return The element that was found, or NULL
*/
AVLNode find(Key k);
int size();
}