Package net.orbyfied.j8.event.pipeline
Class Event
java.lang.Object
net.orbyfied.j8.event.pipeline.Event
- Direct Known Subclasses:
BusEvent
Base event class.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncarried()Returns an immutable map containing all key-value pairs carried.<T> TGets the value corresponding with the specified key.<T> TGets the value corresponding with the specified key.<T> TGets the value corresponding with the specified key.<T> TGets the value corresponding with the specified key.booleanChecks if it carries the key.<T> TCarries a new key-value pair.
-
Constructor Details
-
Event
public Event()
-
-
Method Details
-
carry
Carries a new key-value pair.- Parameters:
key- The key.val- The value.- Returns:
- The value for ease of use.
-
carried
Gets the value corresponding with the specified key. Null if it does not exist.- Parameters:
key- The key.- Returns:
- The value or null.
-
carried
Gets the value corresponding with the specified key. Null if it does not exist.- Parameters:
key- The key.tClass- The assumed type of the value.- Returns:
- The value or null.
-
carried
Gets the value corresponding with the specified key. If it is null the "def" parameter is returned.- Type Parameters:
T- The return type.- Parameters:
key- The key.def- The default/else value.- Returns:
- The value or else the default.
-
carried
Gets the value corresponding with the specified key. If it is null the "def" parameter is returned.- Type Parameters:
T- The return type.- Parameters:
key- The key.def- The default/else value.- Returns:
- The value or else the default.
-
carries
Checks if it carries the key.- Parameters:
key- The key.- Returns:
- True/false.
-
carried
Returns an immutable map containing all key-value pairs carried.- Returns:
- The immutable map.
-