- All Implemented Interfaces:
- java.lang.Iterable<T>, java.util.Collection<T>, java.util.Set<T>
public class Beam<T>
extends java.util.AbstractSet<T>
Implements a finite beam, taking a comparator (default is
ScoredComparator.ASCENDING_COMPARATOR, the MAX object according to
the comparator is the one to be removed) and a beam size on
construction (default is 100). Adding an object may cause the
worst-scored object to be removed from the beam (and that object
may well be the newly added object itself).
- Version:
- 1.0
- Author:
- Dan Klein