Class ImageCounterList<T extends Assignment<ObjectMask>>
Object
ImageCounterList<T>
- Type Parameters:
T
- the payload-type of eachImageCounter
.
- All Implemented Interfaces:
Iterable<ImageCounter<T>>
,ImageCounter<T>
public class ImageCounterList<T extends Assignment<ObjectMask>>
extends Object
implements Iterable<ImageCounter<T>>, ImageCounter<T>
Allows operations to be applied to several
ImageCounter
s collectively.- Author:
- Owen Feehan
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
add
(ImageCounter<T> e) Adds anImageCounter
to the list.<S extends ImageCounter<T>>
booleanaddAll
(Collection<S> e) Adds a collection ofImageCounter
s to the list.void
addAnnotatedImage
(T payload) Add an image that had an associated annotation.void
Add an image that did not have an associated annotation.iterator()
stream()
Returns a sequentialStream
with this list as its source.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
ImageCounterList
public ImageCounterList()
-
-
Method Details
-
add
Adds anImageCounter
to the list.- Parameters:
e
- theImageCounter
to add.- Returns:
- true if the counter was added successfully, false otherwise.
-
addAll
Adds a collection ofImageCounter
s to the list.- Type Parameters:
S
- the type ofImageCounter
s in the collection.- Parameters:
e
- the collection ofImageCounter
s to add.- Returns:
- true if the collection was added successfully, false otherwise.
-
addUnannotatedImage
public void addUnannotatedImage()Description copied from interface:ImageCounter
Add an image that did not have an associated annotation.- Specified by:
addUnannotatedImage
in interfaceImageCounter<T extends Assignment<ObjectMask>>
-
addAnnotatedImage
Description copied from interface:ImageCounter
Add an image that had an associated annotation.- Specified by:
addAnnotatedImage
in interfaceImageCounter<T extends Assignment<ObjectMask>>
- Parameters:
payload
- the payload associated with the annotated image.
-
iterator
- Specified by:
iterator
in interfaceIterable<T extends Assignment<ObjectMask>>
-
stream
Returns a sequentialStream
with this list as its source.- Returns:
- a sequential
Stream
over the elements in this list.
-