Package gaiasky.util.gdx.contrib.utils
Class ItemsManager<T extends com.badlogic.gdx.utils.Disposable>
java.lang.Object
gaiasky.util.gdx.contrib.utils.ItemsManager<T>
- All Implemented Interfaces:
com.badlogic.gdx.utils.Disposable
,Iterable<T>
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Add an item to the manager and transfer ownership to itvoid
Add an item to the manager, if own is true the manager will manage the resource's lifecycleint
count()
Returns the number of items managed by this instancevoid
dispose()
get
(int index) Returns the item at the specified indexiterator()
void
Removes a previously added resourceMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Field Details
-
owned
-
-
Constructor Details
-
ItemsManager
public ItemsManager()
-
-
Method Details
-
dispose
public void dispose()- Specified by:
dispose
in interfacecom.badlogic.gdx.utils.Disposable
-
add
Add an item to the manager, if own is true the manager will manage the resource's lifecycle -
add
Add an item to the manager and transfer ownership to it -
get
Returns the item at the specified index -
count
public int count()Returns the number of items managed by this instance -
iterator
-
remove
Removes a previously added resource
-