Package com.prineside.tdi2.events
Class EventListeners.Entry<T extends Event>
java.lang.Object
com.prineside.tdi2.events.EventListeners.Entry<T>
- All Implemented Interfaces:
Pool.Poolable,KryoSerializable
- Enclosing class:
- EventListeners<T extends Event>
public static final class EventListeners.Entry<T extends Event>
extends Object
implements Pool.Poolable, KryoSerializable
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classEventListeners.Entry.EntryMetaData<T extends Event>Extra info about the entry. -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetName()intbooleanbooleanbooleanvoidvoidremove()voidreset()Resets the object for reuse.setDescription(String description) Give a name for the listener It is advised to set a name manually only when the listener does not-so-obvious job or if there are multiple listeners for the same event in a single class.setPersistent(boolean persistent) setup(Listener<T> listener, int priority, EventListeners<T> listenerGroup, int flags) toString()void
-
Field Details
-
COMPARATOR
-
-
Constructor Details
-
Entry
public Entry()
-
-
Method Details
-
write
- Specified by:
writein interfaceKryoSerializable
-
read
- Specified by:
readin interfaceKryoSerializable
-
getMetaData
-
setName
Give a name for the listener It is advised to set a name manually only when the listener does not-so-obvious job or if there are multiple listeners for the same event in a single class. By default, listener's class name will be used as a name. Example of a good name: [Class it is used in] - [purpose] -
getName
-
setDescription
-
getDescription
-
getPriority
public int getPriority() -
getListener
-
setup
public EventListeners.Entry<T> setup(Listener<T> listener, int priority, EventListeners<T> listenerGroup, int flags) -
reset
public void reset()Description copied from interface:com.badlogic.gdx.utils.Pool.PoolableResets the object for reuse. Object references should be nulled and fields may be set to default values.- Specified by:
resetin interfacePool.Poolable
-
remove
public void remove() -
isStateAffecting
public boolean isStateAffecting() -
isAutoPriority
public boolean isAutoPriority() -
isPersistent
public boolean isPersistent() -
setPersistent
-
setPersistent
-
toString
-