Interface EventContextKey<T>

    • Method Detail

      • allowedType

        java.lang.reflect.Type allowedType()
        Gets the allowed type for the value of this key.

        This is a concrete type equal to the parameter T

        Returns:
        The allowed type
      • isInstance

        boolean isInstance​(java.lang.Object value)
        Return whether the value is an instance of this key's value type.
        Parameters:
        value - value to check
        Returns:
        if instance
      • cast

        T cast​(java.lang.Object value)
        Cast the provided value to the value type.
        Parameters:
        value - value
        Returns:
        the casted value
        Throws:
        java.lang.ClassCastException - if value is not of the correct type