![JAR search and dependency download from the Maven repository](/logo.png)
edu.berkeley.nlp.util.PriorityQueueInterface Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of berkeleyparser Show documentation
Show all versions of berkeleyparser Show documentation
The Berkeley parser analyzes the grammatical structure of natural language using probabilistic context-free grammars (PCFGs).
The newest version!
package edu.berkeley.nlp.util;
public interface PriorityQueueInterface
{
/**
* Returns true if the priority queue is non-empty
*/
public abstract boolean hasNext();
/**
* Returns the element in the queue with highest priority, and pops it from
* the queue.
*/
public abstract E next();
/**
* Not supported -- next() already removes the head of the queue.
*/
public abstract void remove();
/**
* Returns the highest-priority element in the queue, but does not pop it.
*/
public abstract E peek();
/**
* Gets the priority of the highest-priority element of the queue.
*/
public abstract double getPriority();
/**
* Number of elements in the queue.
*/
public abstract int size();
/**
* True if the queue is empty (size == 0).
*/
public abstract boolean isEmpty();
/**
* Adds a key to the queue with the given priority. If the key is already in
* the queue, it will be added an additional time, NOT promoted/demoted.
*
* @param key
* @param priority
*/
public abstract void put(E key, double priority);
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy