public class ItemList<T> extends Commentable implements Iterable<T>
Modifier and Type | Field and Description |
---|---|
protected 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.
|
Iterator<T> |
iterator() |
void |
remove(T item)
Remove an item.
|
String |
toString() |
getComment, setComment
getLocation, setLocation
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
forEach, spliterator
public void add(T item)
item
- The new itempublic void remove(T item)
item
- The item to remove.public boolean isEmpty()
true
if the list is empty.public String toString()
toString
in class Commentable
Copyright © 2017 The Apache Software Foundation. All rights reserved.