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 Summary
FieldsModifier and TypeFieldDescriptionstatic final @Nullable Stringstatic final @Nullable CustomEffectDurationstatic final @Nullable Stringstatic final @Nullable Booleanstatic final @Nullable Map<String, CustomEffectParameter> static final @Nullable CustomEffectQuantitystatic final @Nullable Doublestatic final @Nullable Double -
Constructor Summary
ConstructorsConstructorDescriptionCustomEffect(@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) Creates an instance of aCustomEffectrecord class. -
Method Summary
Modifier and TypeMethodDescriptioncategory()Returns the value of thecategoryrecord component.@Nullable StringReturns the value of thedescriptionrecord component.@Nullable CustomEffectDurationduration()Returns the value of thedurationrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.@Nullable Stringimage()Returns the value of theimagerecord component.@Nullable Booleaninactive()Returns the value of theinactiverecord component.@NotNull CCNamename()Returns the value of thenamerecord component.@Nullable Map<String, CustomEffectParameter> Returns the value of theparametersrecord component.intprice()Returns the value of thepricerecord component.@Nullable CustomEffectQuantityquantity()Returns the value of thequantityrecord component.@Nullable DoubleReturns the value of thesessionCooldownrecord component.final StringtoString()Returns a string representation of this record class.@Nullable DoubleReturns the value of theuserCooldownrecord component.
-
Field Details
-
DEFAULT_DESCRIPTION
-
DEFAULT_CATEGORY
-
DEFAULT_IMAGE
-
DEFAULT_DURATION
-
DEFAULT_QUANTITY
-
DEFAULT_PARAMETERS
-
DEFAULT_SESSIONCOOLDOWN
-
DEFAULT_USERCOOLDOWN
-
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 aCustomEffectrecord class.- Parameters:
name- the value for thenamerecord componentprice- the value for thepricerecord componentdescription- the value for thedescriptionrecord componentcategory- the value for thecategoryrecord componentimage- the value for theimagerecord componentduration- the value for thedurationrecord componentquantity- the value for thequantityrecord componentparameters- the value for theparametersrecord componentsessionCooldown- the value for thesessionCooldownrecord componentuserCooldown- the value for theuserCooldownrecord componentinactive- the value for theinactiverecord component
-
-
Method Details
-
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. -
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. -
equals
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 withObjects::equals(Object,Object); primitive components are compared with '=='. -
name
Returns the value of thenamerecord component.- Returns:
- the value of the
namerecord component
-
price
public int price()Returns the value of thepricerecord component.- Returns:
- the value of the
pricerecord component
-
description
Returns the value of thedescriptionrecord component.- Returns:
- the value of the
descriptionrecord component
-
category
Returns the value of thecategoryrecord component.- Returns:
- the value of the
categoryrecord component
-
image
Returns the value of theimagerecord component.- Returns:
- the value of the
imagerecord component
-
duration
Returns the value of thedurationrecord component.- Returns:
- the value of the
durationrecord component
-
quantity
Returns the value of thequantityrecord component.- Returns:
- the value of the
quantityrecord component
-
parameters
Returns the value of theparametersrecord component.- Returns:
- the value of the
parametersrecord component
-
sessionCooldown
Returns the value of thesessionCooldownrecord component.- Returns:
- the value of the
sessionCooldownrecord component
-
userCooldown
Returns the value of theuserCooldownrecord component.- Returns:
- the value of the
userCooldownrecord component
-
inactive
Returns the value of theinactiverecord component.- Returns:
- the value of the
inactiverecord component
-