public class Beam<T> extends AbstractSet<T>
Modifier and Type | Field and Description |
---|---|
protected Heap<T> |
elements |
protected int |
maxBeamSize |
Constructor and Description |
---|
Beam() |
Beam(int maxBeamSize) |
Beam(int maxBeamSize,
Comparator<? super T> cmp) |
Modifier and Type | Method and Description |
---|---|
boolean |
add(T o) |
List<T> |
asSortedList() |
int |
capacity() |
Iterator<T> |
iterator() |
boolean |
remove(Object o) |
int |
size() |
equals, hashCode, removeAll
addAll, clear, contains, containsAll, isEmpty, retainAll, toArray, toArray, toString
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
addAll, clear, contains, containsAll, isEmpty, retainAll, spliterator, toArray, toArray
parallelStream, removeIf, stream
public Beam()
public Beam(int maxBeamSize)
public Beam(int maxBeamSize, Comparator<? super T> cmp)
public int capacity()
public int size()
size
in interface Collection<T>
size
in interface Set<T>
size
in class AbstractCollection<T>
public boolean add(T o)
add
in interface Collection<T>
add
in interface Set<T>
add
in class AbstractCollection<T>
public boolean remove(Object o)
remove
in interface Collection<T>
remove
in interface Set<T>
remove
in class AbstractCollection<T>