@Override public void play() { if (maximalInstances == 0 || instanceCounter.count() < maximalInstances) { if (!preventSimulaniousPlay || (preventSimulaniousPlay && !playing())) { super.play(); instanceCounter.add(playingTime); } } }
@Override public void stop() { super.stop(); instanceCounter.clear(); }