Interface Manager<T>

Type Parameters:
T - the generics type to contain
All Superinterfaces:
java.lang.Iterable<T>
All Known Implementing Classes:
CommandManager, ListenerManager, ManagerList, ManagerSet

public interface Manager<T>
extends java.lang.Iterable<T>
The represent class to contain items.
  • Method Summary

    Modifier and Type Method Description
    default void add​(T item)
    Add new item into the container.
    java.util.Collection<T> getContainer()
    The container of items
    default @NotNull java.util.Iterator<T> iterator()
    Iterator the container
    default void remove​(T item)
    Remove the item inside container
    default java.util.stream.Stream<T> stream()
    Stream the collection

    Methods inherited from interface java.lang.Iterable

    forEach, spliterator
  • Method Details

    • getContainer

      java.util.Collection<T> getContainer()
      The container of items
      Returns:
      the container of item which contain all items inside
    • add

      default void add​(T item)
      Add new item into the container.
      Parameters:
      item - item to put into
    • remove

      default void remove​(T item)
      Remove the item inside container
      Parameters:
      item - item to pull out
    • stream

      default java.util.stream.Stream<T> stream()
      Stream the collection
      Returns:
      the streamer of collection
    • iterator

      @NotNull default @NotNull java.util.Iterator<T> iterator()
      Iterator the container
      Specified by:
      iterator in interface java.lang.Iterable<T>
      Returns:
      the Collection.iterator() class