public class ItemList<T> extends Commentable implements java.lang.Iterable<T>
Modifier and Type | Field and Description |
---|---|
protected java.util.List<T> |
items
The list holding the items.
|
Constructor and Description |
---|
ItemList() |
Modifier and Type | Method and Description |
---|---|
void |
add(T item)
Add a new item
|
boolean |
isEmpty()
Check if the list is empty.
|
java.util.Iterator<T> |
iterator() |
void |
remove(T item)
Remove an item.
|
java.lang.String |
toString() |
getComment, setComment
getLocation, setLocation
protected final java.util.List<T> items
public void add(T item)
item
- The new itempublic void remove(T item)
item
- The item to remove.public java.util.Iterator<T> iterator()
iterator
in interface java.lang.Iterable<T>
public boolean isEmpty()
true
if the list is empty.public java.lang.String toString()
toString
in class Commentable
Copyright © 2022 The Apache Software Foundation. All rights reserved.