public class RankedSortedRadiusRestrictCollection extends RankedSortedCollection
RankedSortedCollection
that maintains an internal radius and
it does not store objects with a larger distance than this radius.DEFAULT_INITIAL_CAPACITY, UNLIMITED_CAPACITY
Constructor and Description |
---|
RankedSortedRadiusRestrictCollection(float radius)
Constructs an empty collection, the order is defined using the natural order of items.
|
RankedSortedRadiusRestrictCollection(float radius,
int initialCapacity,
int maximalCapacity)
Constructs an empty collection with the specified initial and maximal capacity.
|
Modifier and Type | Method and Description |
---|---|
boolean |
add(RankedAbstractObject e)
Adds the specified element to this list.
|
add, add, clear, isEqual, isIgnoringDuplicates, rankObject, remove, remove, removeFirst, removeLast, setIgnoringDuplicates, setMaximalCapacity, toArray, toArray
getLastDistance, getThresholdDistance, iteratorDistanceRestricted, iteratorDistanceRestricted
addAll, addAllSortedArray, clone, clone, compare, contains, containsAll, element, get, getComparator, getMaximalCapacity, isEmpty, isFull, iterator, iterator, offer, peek, poll, popLast, remove, removeAll, removeAll, removeFirstN, retainAll, size, toString
binarySearch, first, fullSearch, indexOf, last, mergeSort
public RankedSortedRadiusRestrictCollection(float radius, int initialCapacity, int maximalCapacity) throws java.lang.IllegalArgumentException
radius
- maximal distance of the objects to be stored in this locationinitialCapacity
- the initial capacity of the collectionmaximalCapacity
- the maximal capacity of the collectionjava.lang.IllegalArgumentException
- if the specified initial or maximal capacity is invalidpublic RankedSortedRadiusRestrictCollection(float radius) throws java.lang.IllegalArgumentException
radius
- maximal distance of the objects to be stored in this locationjava.lang.IllegalArgumentException
- if the specified initial or maximal capacity is invalidpublic boolean add(RankedAbstractObject e)
SortedCollection
add
in interface java.util.Collection<RankedAbstractObject>
add
in interface java.util.Queue<RankedAbstractObject>
add
in class RankedSortedCollection
e
- element to be appended to this list