Class SinglePlayTrack

java.lang.Object
de.gurkenlabs.litiengine.sound.SinglePlayTrack
All Implemented Interfaces:
Track, java.lang.Iterable<Sound>

public class SinglePlayTrack
extends java.lang.Object
implements Track
A Track that plays a sound once and then stops.
  • Constructor Summary

    Constructors 
    ConstructorDescription
    SinglePlayTrack​(Sound sound)
    Initializes a new SinglePlayTrack for the specified sound.
    SinglePlayTrack​(java.lang.String soundName)
    Initializes a new SinglePlayTrack for the specified sound.
  • Method Summary

    Modifier and TypeMethodDescription
    booleanequals​(java.lang.Object obj) 
    javax.sound.sampled.AudioFormatgetFormat() 
    inthashCode() 
    java.util.Iterator<Sound>iterator() 
    java.lang.StringtoString() 

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait

    Methods inherited from interface java.lang.Iterable

    forEach, spliterator
  • Constructor Details

    • SinglePlayTrack

      public SinglePlayTrack​(java.lang.String soundName)
      Initializes a new SinglePlayTrack for the specified sound.
      Parameters:
      soundName - The name of the sound to be played by this track.
    • SinglePlayTrack

      public SinglePlayTrack​(Sound sound)
      Initializes a new SinglePlayTrack for the specified sound.
      Parameters:
      sound - The sound to be played by this track.
  • Method Details

    • iterator

      public java.util.Iterator<Sound> iterator()
      Specified by:
      iterator in interface java.lang.Iterable<Sound>
    • getFormat

      public javax.sound.sampled.AudioFormat getFormat()
      Specified by:
      getFormat in interface Track
    • equals

      public boolean equals​(java.lang.Object obj)
      Overrides:
      equals in class java.lang.Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class java.lang.Object
    • toString

      public java.lang.String toString()
      Overrides:
      toString in class java.lang.Object