Record Class AudioDescription
java.lang.Object
java.lang.Record
nl.pim16aap2.animatedarchitecture.core.audio.AudioDescription
- Record Components:
sound- The name of the sound to play.volume- The volume at which to play the sound.pitch- The pitch of the sound.duration- The duration of the sound (in milliseconds).
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionAudioDescription(String sound, float volume, float pitch, int duration) Creates an instance of aAudioDescriptionrecord class. -
Method Summary
Modifier and TypeMethodDescriptionintduration()Returns the value of thedurationrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.floatpitch()Returns the value of thepitchrecord component.sound()Returns the value of thesoundrecord component.final StringtoString()Returns a string representation of this record class.floatvolume()Returns the value of thevolumerecord component.
-
Constructor Details
-
Method Details
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
sound
-
volume
-
pitch
-
duration
-