public class DefaultWritableRealPointCollection<L extends RealLocalizable> extends AbstractRealInterval implements WritableRealPointCollection<L>
RealPointCollection
backed by a Map
.max, min
n
Constructor and Description |
---|
DefaultWritableRealPointCollection(Collection<L> points)
Creates a point collection which includes points in the given
Collection . |
DefaultWritableRealPointCollection(Map<gnu.trove.list.array.TDoubleArrayList,L> points)
Creates a point collection which includes points in the given
Map . |
Modifier and Type | Method and Description |
---|---|
void |
addPoint(L point)
Adds a point to the collection.
|
boolean |
equals(Object obj)
Determines whether this point collection describes the same region as
another one.
|
int |
hashCode() |
Iterable<L> |
points()
Returns the points in the collection.
|
void |
removePoint(L point)
Removes the given point from the set, if the point is found in the set.
|
long |
size()
Returns the number of points in the collection.
|
boolean |
test(RealLocalizable l) |
realMax, realMax, realMax, realMin, realMin, realMin, toString
numDimensions
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
boundaryType, equals, hashCode, maskType
and, isEmpty, minus, or, realMax, realMax, realMin, realMin, transform, xor
isAll, knownConstant
numDimensions
maxAsDoubleArray, maxAsRealPoint, minAsDoubleArray, minAsRealPoint, realMax, realMin
public DefaultWritableRealPointCollection(Map<gnu.trove.list.array.TDoubleArrayList,L> points)
Map
.points
- points to include in the collection, the first point
determines the dimensionality of the collection. The keys in
the map should be TDoubleArrayList
s which correspond
to the position of the points.public DefaultWritableRealPointCollection(Collection<L> points)
Collection
.points
- points to include in the collection, the first point
determines the dimensionality of the collectionpublic boolean test(RealLocalizable l)
test
in interface Predicate<RealLocalizable>
public Iterable<L> points()
RealPointCollection
points
in interface RealPointCollection<L extends RealLocalizable>
public long size()
RealPointCollection
size
in interface RealPointCollection<L extends RealLocalizable>
public void addPoint(L point)
WritableRealPointCollection
addPoint
in interface WritableRealPointCollection<L extends RealLocalizable>
point
- Point to add to collectionpublic void removePoint(L point)
removePoint
in interface WritableRealPointCollection<L extends RealLocalizable>
point
- point to be removed, it must have the same hash as a point in
the set in order to be removedpublic boolean equals(Object obj)
RealPointCollection
equals
in interface RealPointCollection<L extends RealLocalizable>
equals
in interface MaskPredicate<RealLocalizable>
equals
in class Object
obj
- The point collection to compare with this one.MaskPredicate.equals(Object)
,
RealPointCollection.equals(RealPointCollection, RealPointCollection)
Copyright © 2015–2022 ImgLib2. All rights reserved.