Class ResourceCollection<Type>
- java.lang.Object
-
- ca.corefacility.bioinformatics.irida.model.IridaRepresentationModel
-
- ca.corefacility.bioinformatics.irida.web.assembler.resource.ResourceCollection<Type>
-
- Type Parameters:
Type
- The type of object in this collection
- All Implemented Interfaces:
java.lang.Iterable<Type>
public class ResourceCollection<Type> extends IridaRepresentationModel implements java.lang.Iterable<Type>
Wraps a collection ofResourceCollection
objects to be sent to the client.
-
-
Constructor Summary
Constructors Constructor Description ResourceCollection()
Default constructor, empty set of resources.ResourceCollection(long size)
Constructor with a pre-defined size for the set of resources.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
add(Type u)
Add a newResourceCollection
to this collection.java.util.List<Type>
getResources()
The collection ofResourceCollection
objects in this collection.java.util.Iterator<Type>
iterator()
int
size()
Get the number of elements in the collection.-
Methods inherited from class ca.corefacility.bioinformatics.irida.model.IridaRepresentationModel
add, add, equals, getLink, getLinks, getRemoteStatus, getSelfHref, hashCode, hasLink, hasLinks, removeLinks, setRemoteStatus, toString
-
-
-
-
Method Detail
-
add
public void add(Type u)
Add a newResourceCollection
to this collection.- Parameters:
u
- TheResourceCollection
to add.
-
getResources
public java.util.List<Type> getResources()
The collection ofResourceCollection
objects in this collection.- Returns:
- a collection of
ResourceCollection
objects.
-
iterator
public java.util.Iterator<Type> iterator()
- Specified by:
iterator
in interfacejava.lang.Iterable<Type>
-
size
public int size()
Get the number of elements in the collection.- Returns:
- the number of elements in the collection.
-
-