Class ItemList<T>

All Implemented Interfaces:
Iterable<T>
Direct Known Subclasses:
ArtifactGroup

public class ItemList<T> extends Commentable implements Iterable<T>
Helper class to hold a list of items.
  • Field Details

    • items

      protected final List<T> items
      The list holding the items.
  • Constructor Details

    • ItemList

      public ItemList()
  • Method Details

    • 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 Iterator<T> iterator()
      Specified by:
      iterator in interface Iterable<T>
    • isEmpty

      public boolean isEmpty()
      Check if the list is empty.
      Returns:
      true if the list is empty.
    • toString

      public String toString()
      Overrides:
      toString in class Commentable