Package de.Keyle.MyPet.api.gui
Record Class SoundSpec.Silent
java.lang.Object
java.lang.Record
de.Keyle.MyPet.api.gui.SoundSpec.Silent
- All Implemented Interfaces:
SoundSpec
- Enclosing interface:
SoundSpec
Plays nothing.
-
Nested Class Summary
Nested classes/interfaces inherited from interface de.Keyle.MyPet.api.gui.SoundSpec
SoundSpec.Choice, SoundSpec.Fixed, SoundSpec.Range, SoundSpec.Silent -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.@Nullable Soundresolve(RandomGenerator random) Resolves this spec into a playable sound.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
INSTANCE
-
-
Constructor Details
-
Silent
public Silent()Creates an instance of aSilentrecord class.
-
-
Method Details
-
resolve
Description copied from interface:SoundSpecResolves this spec into a playable sound.- Specified by:
resolvein interfaceSoundSpec- Parameters:
random- generator used to pick an option and sample any ranges- Returns:
- the sound to play, or
nullforSoundSpec.Silent
-
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.
-