Class TwitchEnum<E extends Enum<E>>

java.lang.Object
com.github.twitch4j.common.enums.TwitchEnum<E>
Type Parameters:
E - the underlying enum type

public final class TwitchEnum<E extends Enum<E>> extends Object
Wrapper for a Twitch-specified enum where all of the possible values may not be documented.
  • Constructor Details

    • TwitchEnum

      public TwitchEnum(@NotNull E value, @NotNull @NotNull String rawValue)
      Creates a new TwitchEnum instance.
      Parameters:
      value - The parsed enum value.
      rawValue - The raw string provided by Twitch to represent this enum.

      This field is useful when getValue() yields UNKNOWN. Please report such cases to our issue tracker.

  • Method Details

    • getValue

      @NotNull public E getValue()
      The parsed enum value.
    • getRawValue

      @NotNull public @NotNull String getRawValue()
      The raw string provided by Twitch to represent this enum.

      This field is useful when getValue() yields UNKNOWN. Please report such cases to our issue tracker.

    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object