Class BeadsSoundEngineFactory

  • java.lang.Object
  • All Implemented Interfaces:

    public class BeadsSoundEngineFactory
    extends java.lang.Object
    implements SoundEngineFactory
    Beads implementation of the SoundEngineFactory. All the object returned are typed with classes of this package. Therefore all the classes use the same Beads library and enjoy package access with one another. Also they can be safely downcasted in order to get full functionality. For example in createParameter the argument of type SoundWave is downcasted to BeadsSoundWave. This is guaranteed to be safe because the way SoundWave objects are created is through the createSoundWave method, which returns a BeadsSoundWave. This is in the spirit of the Facade design pattern. So a unique point of access to the package object guarantees all the objects come from that package, despite implementing interfaces which are defined outside.