Package me.playernguyen.opteco.manager
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 itemsdefault @NotNull java.util.Iterator<T>
iterator()
Iterator the containerdefault void
remove(T item)
Remove the item inside containerdefault java.util.stream.Stream<T>
stream()
Stream the collection
-
Method Details
-
getContainer
java.util.Collection<T> getContainer()The container of items- Returns:
- the container of item which contain all items inside
-
add
Add new item into the container.- Parameters:
item
- item to put into
-
remove
Remove the item inside container- Parameters:
item
- item to pull out
-
stream
Stream the collection- Returns:
- the streamer of collection
-
iterator
Iterator the container- Specified by:
iterator
in interfacejava.lang.Iterable<T>
- Returns:
- the
Collection.iterator()
class
-