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 voidadd(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 voidremove(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:
iteratorin interfacejava.lang.Iterable<T>- Returns:
- the
Collection.iterator()class
-