Package dev.gothickit.zenkit.csl
Record Class CachedCutsceneMessage
java.lang.Object
java.lang.Record
dev.gothickit.zenkit.csl.CachedCutsceneMessage
- All Implemented Interfaces:
CacheableObject<CachedCutsceneMessage>,CutsceneMessage
public record CachedCutsceneMessage(int type, @NotNull String text, @NotNull String name)
extends Record
implements CutsceneMessage
-
Constructor Summary
ConstructorsConstructorDescriptionCachedCutsceneMessage(int type, @NotNull String text, @NotNull String name) Creates an instance of aCachedCutsceneMessagerecord class. -
Method Summary
Modifier and TypeMethodDescription@NotNull CachedCutsceneMessagecache()final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanisCached()@NotNull Stringname()Returns the value of thenamerecord component.@NotNull Stringtext()Returns the value of thetextrecord component.final StringtoString()Returns a string representation of this record class.inttype()Returns the value of thetyperecord component.
-
Constructor Details
-
CachedCutsceneMessage
public CachedCutsceneMessage(int type, @NotNull @NotNull String text, @NotNull @NotNull String name) Creates an instance of aCachedCutsceneMessagerecord class.- Parameters:
type- the value for thetyperecord componenttext- the value for thetextrecord componentname- the value for thenamerecord component
-
-
Method Details
-
cache
- Specified by:
cachein interfaceCacheableObject<CachedCutsceneMessage>
-
isCached
public boolean isCached()- Specified by:
isCachedin interfaceCacheableObject<CachedCutsceneMessage>
-
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 '=='. -
type
public int type()Returns the value of thetyperecord component.- Specified by:
typein interfaceCutsceneMessage- Returns:
- the value of the
typerecord component
-
text
Returns the value of thetextrecord component.- Specified by:
textin interfaceCutsceneMessage- Returns:
- the value of the
textrecord component
-
name
Returns the value of thenamerecord component.- Specified by:
namein interfaceCutsceneMessage- Returns:
- the value of the
namerecord component
-