Class SignalKey<T>
java.lang.Object
me.tamkungz.signals.SignalKey<T>
- Type Parameters:
T- payload type
Identifies one signal channel: a payload type plus a name.
Keys with the same type and name address the same channel; derived keys created by
Signal.filter(Predicate) and Signal.map(Class, Function) are always unique.
-
Method Details
-
of
-
named
-
eventType
-
name
-
cast
Casts a value to this key's payload type.- Parameters:
value- value to cast, may benull- Returns:
- the value as
T - Throws:
ClassCastException- if the value is not an instance of the payload type
-
equals
-
hashCode
-
toString
-