Class ItemList<T>
- java.lang.Object
-
- org.apache.sling.provisioning.model.Traceable
-
- org.apache.sling.provisioning.model.Commentable
-
- org.apache.sling.provisioning.model.ItemList<T>
-
- All Implemented Interfaces:
java.lang.Iterable<T>
- Direct Known Subclasses:
ArtifactGroup
public class ItemList<T> extends Commentable implements java.lang.Iterable<T>
Helper class to hold a list of items.
-
-
Constructor Summary
Constructors Constructor Description ItemList()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
add(T item)
Add a new itemboolean
isEmpty()
Check if the list is empty.java.util.Iterator<T>
iterator()
void
remove(T item)
Remove an item.java.lang.String
toString()
-
Methods inherited from class org.apache.sling.provisioning.model.Commentable
getComment, setComment
-
Methods inherited from class org.apache.sling.provisioning.model.Traceable
getLocation, setLocation
-
-
-
-
Method Detail
-
add
public void add(T item)
Add a new item- Parameters:
item
- The new item
-
remove
public void remove(T item)
Remove an item.- Parameters:
item
- The item to remove.
-
iterator
public java.util.Iterator<T> iterator()
- Specified by:
iterator
in interfacejava.lang.Iterable<T>
-
isEmpty
public boolean isEmpty()
Check if the list is empty.- Returns:
true
if the list is empty.
-
toString
public java.lang.String toString()
- Overrides:
toString
in classCommentable
-
-