|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--javax.media.jai.CollectionImage | +--javax.media.jai.AttributedImageCollection
Class representing a CollectionImage wherein all image elements are AttributedImage instances. All Collection methods will be overridden such that contained images are forced to be AttributedImages.
Note that the methods getAll(attribute)
and
removeAll(attribute)
use the equals()
method
of the attribute parameter rather that that of the
AttributedImage
s in the Collection
. This
permits "filtering" if the attribute of the AttributedImage
s
contains more than one type of value. For example, if the attribute
contained both position and time, then the parameter attribute
could be an instance of a class which compared only the position if it
were desired to obtain or remove all images at a given position
irrespective of the time stamp.
Fields inherited from class javax.media.jai.CollectionImage |
eventManager, imageCollection, imageFactory, properties, sinks |
Constructor Summary | |
protected |
AttributedImageCollection()
|
|
AttributedImageCollection(Collection images)
Constructs an AttributedImageCollection with contents
set to the contents of the supplied Collection . |
Method Summary | |
boolean |
add(Object o)
Adds the specified object to this Collection . |
boolean |
addAll(Collection c)
Adds to this Collection all elements in the specified
Collection which are AttributedImage s. |
Set |
getAll(Object attribute)
Returns a Set of all AttributedImages the attribute of which is equal to the parameter object according to the equals() method of the parameter object. |
Set |
getAll(PlanarImage image)
Returns a Set of all AttributedImages the image of which is equal to the parameter image. |
AttributedImage |
getAttributedImage(Object attribute)
Returns the first attributed image found in the collection that contains the attribute. |
AttributedImage |
getAttributedImage(PlanarImage image)
Returns the first attributed image found in the collection that contains the planar image argument. |
Set |
removeAll(Object attribute)
Removes all AttributedImages the attribute of which is equal to the parameter object according to the equals() method of the parameter object. |
Set |
removeAll(PlanarImage image)
Removes all AttributedImages the image of which is equal to the parameter image. |
Methods inherited from class javax.media.jai.CollectionImage |
addPropertyChangeListener, addPropertyChangeListener, addSink, clear, contains, containsAll, get, getImageFactory, getProperty, getProperty, getPropertyClass, getPropertyNames, getPropertyNames, getSinks, isEmpty, iterator, remove, removeAll, removeProperty, removePropertyChangeListener, removePropertyChangeListener, removeSink, removeSinks, retainAll, setImageFactory, setProperty, size, toArray, toArray |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface java.util.Collection |
equals, hashCode |
Constructor Detail |
protected AttributedImageCollection()
public AttributedImageCollection(Collection images)
AttributedImageCollection
with contents
set to the contents of the supplied Collection
. Only
elements in the Collection
which are instances of
AttributedImage
will be added.IllegalArgumentException
- if images
is null
Method Detail |
public Set getAll(Object attribute)
public Set getAll(PlanarImage image)
public Set removeAll(Object attribute)
public Set removeAll(PlanarImage image)
public boolean add(Object o)
Collection
. This
method overrides the superclass method in order to perform a
type check on the object being added.add
in class CollectionImage
true
if and only if the parameter is added to the
Collection
.IllegalArgumentException
- if o
is null
or is not an AttributedImage
.public boolean addAll(Collection c)
Collection
all elements in the specified
Collection
which are AttributedImage
s.addAll
in class CollectionImage
true
if this Collection
changed
as a result of the call.public AttributedImage getAttributedImage(PlanarImage image)
public AttributedImage getAttributedImage(Object attribute)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |