Record Class AudioSet

java.lang.Object
java.lang.Record
nl.pim16aap2.animatedarchitecture.core.audio.AudioSet
Record Components:
activeAudio - The audio to use while the animation is active. Taking a structure as an example, this could be sound of the scraping of the bottom part of the structure along the floor.
endAudio - The audio to use at the end of the animation when it is shutting down. Looking at a structure again, this could describe the sound of the structure slamming into the structure frame.

public record AudioSet(@Nullable AudioDescription activeAudio, @Nullable AudioDescription endAudio) extends Record
Represents a set of audio descriptions that together define the set of audio descriptions to be used in an animation.
  • Constructor Details

    • AudioSet

      public AudioSet(@Nullable @Nullable AudioDescription activeAudio, @Nullable @Nullable AudioDescription endAudio)
      Creates an instance of a AudioSet record class.
      Parameters:
      activeAudio - the value for the activeAudio record component
      endAudio - the value for the endAudio record component
  • Method Details

    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • activeAudio

      @Nullable public @Nullable AudioDescription activeAudio()
      Returns the value of the activeAudio record component.
      Returns:
      the value of the activeAudio record component
    • endAudio

      @Nullable public @Nullable AudioDescription endAudio()
      Returns the value of the endAudio record component.
      Returns:
      the value of the endAudio record component