Record Class CustomEffect

java.lang.Object
java.lang.Record
live.crowdcontrol.cc4j.websocket.http.CustomEffect

public record CustomEffect(@NotNull CCName name, int price, @Nullable String description, @Nullable List<String> category, @Nullable String image, @Nullable CustomEffectDuration duration, @Nullable CustomEffectQuantity quantity, @Nullable Map<String,CustomEffectParameter> parameters, @Nullable Double sessionCooldown, @Nullable Double userCooldown, @Nullable Boolean inactive) extends Record
  • Field Details

    • DEFAULT_DESCRIPTION

      @Nullable public static final @Nullable String DEFAULT_DESCRIPTION
    • DEFAULT_CATEGORY

      @Nullable public static final @Nullable List<String> DEFAULT_CATEGORY
    • DEFAULT_IMAGE

      @Nullable public static final @Nullable String DEFAULT_IMAGE
    • DEFAULT_DURATION

      @Nullable public static final @Nullable CustomEffectDuration DEFAULT_DURATION
    • DEFAULT_QUANTITY

      @Nullable public static final @Nullable CustomEffectQuantity DEFAULT_QUANTITY
    • DEFAULT_PARAMETERS

      @Nullable public static final @Nullable Map<String,CustomEffectParameter> DEFAULT_PARAMETERS
    • DEFAULT_SESSIONCOOLDOWN

      @Nullable public static final @Nullable Double DEFAULT_SESSIONCOOLDOWN
    • DEFAULT_USERCOOLDOWN

      @Nullable public static final @Nullable Double DEFAULT_USERCOOLDOWN
    • DEFAULT_INACTIVE

      @Nullable public static final @Nullable Boolean DEFAULT_INACTIVE
  • Constructor Details

    • CustomEffect

      public CustomEffect(@NotNull @NotNull CCName name, int price, @Nullable @Nullable String description, @Nullable @Nullable List<String> category, @Nullable @Nullable String image, @Nullable @Nullable CustomEffectDuration duration, @Nullable @Nullable CustomEffectQuantity quantity, @Nullable @Nullable Map<String,CustomEffectParameter> parameters, @Nullable @Nullable Double sessionCooldown, @Nullable @Nullable Double userCooldown, @Nullable @Nullable Boolean inactive)
      Creates an instance of a CustomEffect record class.
      Parameters:
      name - the value for the name record component
      price - the value for the price record component
      description - the value for the description record component
      category - the value for the category record component
      image - the value for the image record component
      duration - the value for the duration record component
      quantity - the value for the quantity record component
      parameters - the value for the parameters record component
      sessionCooldown - the value for the sessionCooldown record component
      userCooldown - the value for the userCooldown record component
      inactive - the value for the inactive record component
  • Method Details

    • 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. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with '=='.
      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.
    • name

      @NotNull public @NotNull CCName name()
      Returns the value of the name record component.
      Returns:
      the value of the name record component
    • price

      public int price()
      Returns the value of the price record component.
      Returns:
      the value of the price record component
    • description

      @Nullable public @Nullable String description()
      Returns the value of the description record component.
      Returns:
      the value of the description record component
    • category

      @Nullable public @Nullable List<String> category()
      Returns the value of the category record component.
      Returns:
      the value of the category record component
    • image

      @Nullable public @Nullable String image()
      Returns the value of the image record component.
      Returns:
      the value of the image record component
    • duration

      @Nullable public @Nullable CustomEffectDuration duration()
      Returns the value of the duration record component.
      Returns:
      the value of the duration record component
    • quantity

      @Nullable public @Nullable CustomEffectQuantity quantity()
      Returns the value of the quantity record component.
      Returns:
      the value of the quantity record component
    • parameters

      @Nullable public @Nullable Map<String,CustomEffectParameter> parameters()
      Returns the value of the parameters record component.
      Returns:
      the value of the parameters record component
    • sessionCooldown

      @Nullable public @Nullable Double sessionCooldown()
      Returns the value of the sessionCooldown record component.
      Returns:
      the value of the sessionCooldown record component
    • userCooldown

      @Nullable public @Nullable Double userCooldown()
      Returns the value of the userCooldown record component.
      Returns:
      the value of the userCooldown record component
    • inactive

      @Nullable public @Nullable Boolean inactive()
      Returns the value of the inactive record component.
      Returns:
      the value of the inactive record component