Package com.prineside.tdi2.events
Class EventListeners.Entry<T extends Event>
java.lang.Object
com.prineside.tdi2.events.EventListeners.Entry<T>
- All Implemented Interfaces:
com.badlogic.gdx.utils.Pool.Poolable
,com.esotericsoftware.kryo.KryoSerializable
- Enclosing class:
- EventListeners<T extends Event>
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic final class
EventListeners.Entry.EntryMetaData<T extends Event>
Extra info about the entry. -
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetName()
int
boolean
boolean
boolean
void
read
(com.esotericsoftware.kryo.Kryo kryo, com.esotericsoftware.kryo.io.Input input) void
remove()
void
reset()
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
write
(com.esotericsoftware.kryo.Kryo kryo, com.esotericsoftware.kryo.io.Output output)
-
Field Details
-
COMPARATOR
-
-
Constructor Details
-
Entry
public Entry()
-
-
Method Details
-
write
public void write(com.esotericsoftware.kryo.Kryo kryo, com.esotericsoftware.kryo.io.Output output) - Specified by:
write
in interfacecom.esotericsoftware.kryo.KryoSerializable
-
read
public void read(com.esotericsoftware.kryo.Kryo kryo, com.esotericsoftware.kryo.io.Input input) - Specified by:
read
in interfacecom.esotericsoftware.kryo.KryoSerializable
-
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.Poolable
Resets the object for reuse. Object references should be nulled and fields may be set to default values.- Specified by:
reset
in interfacecom.badlogic.gdx.utils.Pool.Poolable
-
remove
public void remove() -
isStateAffecting
public boolean isStateAffecting() -
isAutoPriority
public boolean isAutoPriority() -
isPersistent
public boolean isPersistent() -
setPersistent
-
setPersistent
-
toString
-