Class ItemsManager<T extends com.badlogic.gdx.utils.Disposable>
java.lang.Object
gaiasky.render.util.ItemsManager<T>
- All Implemented Interfaces:
com.badlogic.gdx.utils.Disposable, Iterable<T>
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidAdd an item to the manager and transfer ownership to itvoidAdd an item to the manager, if own is true the manager will manage the resource's lifecyclevoidvoidintcount()Returns the number of items managed by this instancevoiddispose()get(int index) Returns the item at the specified indexiterator()voidRemoves a previously added resourceMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Iterable
forEach, spliterator
-
Field Details
-
owned
-
-
Constructor Details
-
ItemsManager
public ItemsManager()
-
-
Method Details
-
dispose
public void dispose()- Specified by:
disposein 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
Add an item to the manager and transfer ownership to it -
add
-
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
-