Class EmptyEventContext

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      <T> T get​(java.lang.Class<T> desiredType, int index)
      This should never be called because the count is always zero.
      int getCount()
      Always returns zero.
      boolean isEmpty()
      Returns true if this context contains no elements.
      java.lang.String[] toStrings()
      Extracts the value of each context value as a string.
      <T> java.util.Optional<T> tryGet​(java.lang.Class<T> desiredType, int index)
      Tries to extract a parameter value and coerces or decodes it to the desired type.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • get

        public <T> T get​(java.lang.Class<T> desiredType,
                         int index)
        This should never be called because the count is always zero.
        Specified by:
        get in interface EventContext
        Parameters:
        desiredType - the type of value required
        index - identifies which parameter value to extract
        Returns:
        the value extracted and converted or coerced
      • toStrings

        public java.lang.String[] toStrings()
        Description copied from interface: EventContext
        Extracts the value of each context value as a string.
        Specified by:
        toStrings in interface EventContext
        Returns:
        context values
      • tryGet

        public <T> java.util.Optional<T> tryGet​(java.lang.Class<T> desiredType,
                                                int index)
        Description copied from interface: EventContext
        Tries to extract a parameter value and coerces or decodes it to the desired type.
        Specified by:
        tryGet in interface EventContext
        Parameters:
        desiredType - the type of value required
        index - identifies which parameter value to extract
        Returns:
        the value extracted and converted or coerced, wrapped in an Optional, or Optional.empty() if index is out of bounds, or the value can't be converted.