Class LoopedTrack

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

public class LoopedTrack
extends java.lang.Object
implements Track, java.util.Iterator<Sound>
  • Constructor Summary

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

    Modifier and TypeMethodDescription
    booleanequals​(java.lang.Object anObject) 
    javax.sound.sampled.AudioFormatgetFormat() 
    inthashCode() 
    booleanhasNext() 
    java.util.Iterator<Sound>iterator() 
    Soundnext() 
    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

    Methods inherited from interface java.util.Iterator

    forEachRemaining, remove
  • Constructor Details

    • LoopedTrack

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

      public LoopedTrack​(Sound sound)
      Initializes a new LoopedTrack 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
    • hasNext

      public boolean hasNext()
      Specified by:
      hasNext in interface java.util.Iterator<Sound>
    • next

      public Sound next()
      Specified by:
      next in interface java.util.Iterator<Sound>
    • equals

      public boolean equals​(java.lang.Object anObject)
      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