Record Class Destination

java.lang.Object
java.lang.Record
net.flectone.pulse.model.util.Destination

public record Destination(Destination.Type type, String subtext, BossBar bossBar, Times times, Toast toast, TextScreen textScreen) extends Record
  • Field Details

    • DEFAULT_TYPE

      public static final Destination.Type DEFAULT_TYPE
    • DEFAULT_SUBTEXT

      public static final String DEFAULT_SUBTEXT
      See Also:
    • DEFAULT_BOSS_BAR

      public static final BossBar DEFAULT_BOSS_BAR
    • DEFAULT_TIMES

      public static final Times DEFAULT_TIMES
    • DEFAULT_TOAST

      public static final Toast DEFAULT_TOAST
    • DEFAULT_TEXT_SCREEN

      public static final TextScreen DEFAULT_TEXT_SCREEN
    • EMPTY_ACTION_BAR

      public static final Destination EMPTY_ACTION_BAR
    • EMPTY_BOSS_BAR

      public static final Destination EMPTY_BOSS_BAR
    • EMPTY_BRAND

      public static final Destination EMPTY_BRAND
    • EMPTY_CHAT

      public static final Destination EMPTY_CHAT
    • EMPTY_TITLE

      public static final Destination EMPTY_TITLE
    • EMPTY_SUBTITLE

      public static final Destination EMPTY_SUBTITLE
    • EMPTY_TAB_HEADER

      public static final Destination EMPTY_TAB_HEADER
    • EMPTY_TEXT_SCREEN

      public static final Destination EMPTY_TEXT_SCREEN
    • EMPTY_TOAST

      public static final Destination EMPTY_TOAST
  • Constructor Details

    • Destination

      public Destination(Destination.Type type, String subtext, BossBar bossBar, Times times, Toast toast, TextScreen textScreen)
      Creates an instance of a Destination record class.
      Parameters:
      type - the value for the type record component
      subtext - the value for the subtext record component
      bossBar - the value for the bossBar record component
      times - the value for the times record component
      toast - the value for the toast record component
      textScreen - the value for the textScreen record component
    • Destination

      public Destination(Destination.Type type)
    • Destination

      public Destination(Destination.Type type, BossBar bossBar)
    • Destination

      public Destination(Destination.Type type, Times times)
    • Destination

      public Destination(Destination.Type type, Times times, String subtext)
    • Destination

      public Destination(Destination.Type type, Toast toast, String subtext)
    • Destination

      public Destination(Destination.Type type, TextScreen textScreen)
  • Method Details

    • fromJson

      public static Destination fromJson(Map<String,Object> map)
    • toJson

      public Map<String,Object> toJson()
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • type

      public Destination.Type type()
      Returns the value of the type record component.
      Returns:
      the value of the type record component
    • subtext

      public String subtext()
      Returns the value of the subtext record component.
      Returns:
      the value of the subtext record component
    • bossBar

      public BossBar bossBar()
      Returns the value of the bossBar record component.
      Returns:
      the value of the bossBar record component
    • times

      public Times times()
      Returns the value of the times record component.
      Returns:
      the value of the times record component
    • toast

      public Toast toast()
      Returns the value of the toast record component.
      Returns:
      the value of the toast record component
    • textScreen

      public TextScreen textScreen()
      Returns the value of the textScreen record component.
      Returns:
      the value of the textScreen record component