Enum DebouncePhase

    • Enum Constant Detail

      • LEADING

        public static final DebouncePhase LEADING
        Debounce phase that happens immediately when the event is first triggered. Another leading event will not be sent to the server until the debounce timeout period has passed without any new events being fired. This is useful for cases such as button click where double submitting should be avoided.
      • INTERMEDIATE

        public static final DebouncePhase INTERMEDIATE
        Debounce phase for events that are periodically sent to the server while events are being fired in rapid succession. This is useful for cases such as text input when you don't want to receive an event for each individual keystroke, but still want periodic updates. This is sometimes useful in combination with LEADING so that the first event is sent immediately. Can also be combined with TRAILING to get a separate event when the input has stopped.
      • TRAILING

        public static final DebouncePhase TRAILING
        Debounce phase that is sent to the server once there have been at least one debounce timeout period since the last event of the same type. This is useful for cases such as text input when you are only want to react to the text when the user pauses typing.
    • Method Detail

      • values

        public static DebouncePhase[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (DebouncePhase c : DebouncePhase.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static DebouncePhase valueOf​(String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        IllegalArgumentException - if this enum type has no constant with the specified name
        NullPointerException - if the argument is null
      • getIdentifier

        public String getIdentifier()
        Gets the string that is used to identify this phase.
        Returns:
        the identifier string
        See Also:
        forIdentifier(String)
      • forIdentifier

        public static DebouncePhase forIdentifier​(String identifier)
        Gets the phase that corresponds to the given identifier character.
        Parameters:
        identifier - the identifier character to look for
        Returns:
        the debounce phase corresponding to the provided identifier character
        Throws:
        IllegalArgumentException - if there is no corresponding character
        See Also:
        getIdentifier()