public class PriorityQueue extends Object implements Collection, Queue
Modifier and Type | Field and Description |
---|---|
static double |
RESIZE_FACTOR |
Constructor and Description |
---|
PriorityQueue(Comparator comparator) |
Modifier and Type | Method and Description |
---|---|
boolean |
add(Object o) |
boolean |
addAll(Collection c) |
void |
clear() |
boolean |
contains(Object o) |
boolean |
containsAll(Collection c) |
Object |
deq() |
void |
enq(Object object) |
Object |
extract() |
Object |
get(int i) |
Object |
getRoot() |
void |
init(int size) |
void |
insert(Object value) |
boolean |
isEmpty() |
Iterator |
iterator() |
void |
remove(int i) |
boolean |
remove(Object o) |
boolean |
removeAll(Collection c) |
boolean |
retainAll(Collection c) |
int |
size() |
void |
swap(int i,
int j)
TODO: DOCUMENT ME!
|
Object[] |
toArray() |
Object[] |
toArray(Object[] a) |
void |
update() |
int |
update(int i) |
void |
update(Object value)
This method find index based on object value in parameter and call update method on that
index
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
equals, hashCode, parallelStream, removeIf, spliterator, stream
public PriorityQueue(Comparator comparator)
public void init(int size)
public void insert(Object value)
public Object extract()
public Object getRoot()
public void update()
public int update(int i)
public void update(Object value)
value
- - object which will be updatedpublic boolean isEmpty()
isEmpty
in interface Collection
isEmpty
in interface Queue
public int size()
size
in interface Collection
public void swap(int i, int j)
public void clear()
clear
in interface Collection
clear
in interface Queue
public Object[] toArray()
toArray
in interface Collection
public boolean add(Object o)
add
in interface Collection
public Object get(int i)
public boolean contains(Object o)
contains
in interface Collection
public boolean remove(Object o)
remove
in interface Collection
public void remove(int i)
public boolean addAll(Collection c)
addAll
in interface Collection
public boolean containsAll(Collection c)
containsAll
in interface Collection
public boolean removeAll(Collection c)
removeAll
in interface Collection
public boolean retainAll(Collection c)
retainAll
in interface Collection
public Iterator iterator()
iterator
in interface Iterable
iterator
in interface Collection
public Object[] toArray(Object[] a)
toArray
in interface Collection
Copyright © 1996–2019 Geotools. All rights reserved.