Package dev.gothickit.zenkit.mds
Record Class CachedEventSoundEffect
java.lang.Object
java.lang.Record
dev.gothickit.zenkit.mds.CachedEventSoundEffect
- All Implemented Interfaces:
CacheableObject<CachedEventSoundEffect>,EventSoundEffect
public record CachedEventSoundEffect(int frame, @NotNull String name, float range, boolean emptySlot)
extends Record
implements EventSoundEffect
-
Constructor Summary
ConstructorsConstructorDescriptionCachedEventSoundEffect(int frame, @NotNull String name, float range, boolean emptySlot) Creates an instance of aCachedEventSoundEffectrecord class. -
Method Summary
Modifier and TypeMethodDescription@NotNull CachedEventSoundEffectcache()booleanReturns the value of theemptySlotrecord component.final booleanIndicates whether some other object is "equal to" this one.intframe()Returns the value of theframerecord component.final inthashCode()Returns a hash code value for this object.booleanisCached()@NotNull Stringname()Returns the value of thenamerecord component.floatrange()Returns the value of therangerecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
CachedEventSoundEffect
public CachedEventSoundEffect(int frame, @NotNull @NotNull String name, float range, boolean emptySlot) Creates an instance of aCachedEventSoundEffectrecord class.- Parameters:
frame- the value for theframerecord componentname- the value for thenamerecord componentrange- the value for therangerecord componentemptySlot- the value for theemptySlotrecord component
-
-
Method Details
-
cache
- Specified by:
cachein interfaceCacheableObject<CachedEventSoundEffect>
-
isCached
public boolean isCached()- Specified by:
isCachedin interfaceCacheableObject<CachedEventSoundEffect>
-
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 '=='. -
frame
public int frame()Returns the value of theframerecord component.- Specified by:
framein interfaceEventSoundEffect- Returns:
- the value of the
framerecord component
-
name
Returns the value of thenamerecord component.- Specified by:
namein interfaceEventSoundEffect- Returns:
- the value of the
namerecord component
-
range
public float range()Returns the value of therangerecord component.- Specified by:
rangein interfaceEventSoundEffect- Returns:
- the value of the
rangerecord component
-
emptySlot
public boolean emptySlot()Returns the value of theemptySlotrecord component.- Specified by:
emptySlotin interfaceEventSoundEffect- Returns:
- the value of the
emptySlotrecord component
-