Record Class ColorParticle
java.lang.Object
java.lang.Record
dev.wyck.wrapper.environment.particle.options.ColorParticle
- Record Components:
color- The color of the particle.
- All Implemented Interfaces:
ParticleData
@NullMarked
@AsOf("2.0.0")
public record ColorParticle(int color)
extends Record
implements ParticleData
Particle data for particles that require a color.
- Since:
- 2.0.0
-
Constructor Summary
ConstructorsConstructorDescriptionColorParticle(int color) Creates an instance of aColorParticlerecord class. -
Method Summary
Modifier and TypeMethodDescriptionapply(ParticleType particleType) Applies the particle data to the given particle type and returns the corresponding ParticleOptions.intcolor()Returns the value of thecolorrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.static ColorParticlefinal StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ColorParticle
public ColorParticle(int color) Creates an instance of aColorParticlerecord class.- Parameters:
color- the value for thecolorrecord component
-
-
Method Details
-
apply
Description copied from interface:ParticleDataApplies the particle data to the given particle type and returns the corresponding ParticleOptions.- Specified by:
applyin interfaceParticleData- Parameters:
particleType- The particle type to which the data will be applied.- Returns:
- The ParticleOptions representing the applied particle data.
-
of
-
toString
-
hashCode
-
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 with thecomparemethod from their corresponding wrapper classes. -
color
-