///this is the Entry /* * Copyright 2014, Michael T. Goodrich, Roberto Tamassia,
ID: 3737435 • Letter: #
Question
///this is the Entry
/*
* Copyright 2014, Michael T. Goodrich, Roberto Tamassia, Michael H. Goldwasser
*
* Developed for use with the book:
*
* Data Structures and Algorithms in Java, Sixth Edition
* Michael T. Goodrich, Roberto Tamassia, and Michael H. Goldwasser
* John Wiley & Sons, 2014
*
* 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 program. If not, see <http://www.gnu.org/licenses/>.
*/
package net.datastructures;
/**
* Interface for a key-value pair.
*
* @author Michael T. Goodrich
* @author Roberto Tamassia
* @author Michael H. Goldwasser
*/
public interface Entry<K,V> {
/**
* Returns the key stored in this entry.
* @return the entry's key
*/
K getKey();
/**
* Returns the value stored in this entry.
* @return the entry's value
*/
V getValue();
}
import net.datastructures.Entry;
public class MyMaxPriorityQueue<K, V> {
@Override
public int size() {
// TODO Auto-generated method stub
return 0;
}
@Override
public Entry<K, V> insert(K key, V value) throws IllegalArgumentException {
// TODO Auto-generated method stub
return null;
}
@Override
public Entry<K, V> max() {
// TODO Auto-generated method stub
return null;
}
@Override
public Entry<K, V> removeMax() {
// TODO Auto-generated method stub
return null;
}
}