Record Class EffectInfo<E,D>
java.lang.Object
java.lang.Record
org.skriptlang.skript.bukkit.particles.registration.EffectInfo<E,D>
- Type Parameters:
E- The type of effectD- The type of data required by the particle- Record Components:
effect- The effect typepattern- The pattern that can be used to parse this particledataSupplier- Function to supply data from parsed expressionstoStringFunction- Function to convert the particle and data to a string representation
public record EffectInfo<E,D> (E effect, String pattern, DataSupplier<D> dataSupplier, ToString toStringFunction)
extends Record
Information about a effect type that requires additional data.
-
Constructor Summary
ConstructorsConstructorDescriptionEffectInfo(E effect, String pattern, DataSupplier<D> dataSupplier, ToString toStringFunction) Creates an instance of aEffectInforecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thedataSupplierrecord component.effect()Returns the value of theeffectrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.pattern()Returns the value of thepatternrecord component.final StringtoString()Returns a string representation of this record class.Returns the value of thetoStringFunctionrecord component.
-
Constructor Details
-
EffectInfo
public EffectInfo(E effect, String pattern, DataSupplier<D> dataSupplier, ToString toStringFunction) Creates an instance of aEffectInforecord class.- Parameters:
effect- the value for theeffectrecord componentpattern- the value for thepatternrecord componentdataSupplier- the value for thedataSupplierrecord componenttoStringFunction- the value for thetoStringFunctionrecord 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. All components in this record class are compared withObjects::equals(Object,Object). -
effect
Returns the value of theeffectrecord component.- Returns:
- the value of the
effectrecord component
-
pattern
Returns the value of thepatternrecord component.- Returns:
- the value of the
patternrecord component
-
dataSupplier
Returns the value of thedataSupplierrecord component.- Returns:
- the value of the
dataSupplierrecord component
-
toStringFunction
Returns the value of thetoStringFunctionrecord component.- Returns:
- the value of the
toStringFunctionrecord component
-