Code example for Queue

Methods: add, isEmpty, poll

0
		} 
		queueTransition(params);
	} 
 
	private void queueTransition(TransitionParams params) {
		queuedTransitions.add(params);
		processTransitionQueue(); 
	} 
 
	private void processTransitionQueue() { 
		if (!queuedTransitions.isEmpty() && !hasUnfinishedAnimationsRunning()) {
			TransitionParams nextTransitionParams = queuedTransitions.poll();
			doTransition(nextTransitionParams);
		} 
	} 
 
	private boolean hasUnfinishedAnimationsRunning() { 
		return animationsRunning > 0;
	} 
 
	private void doTransition(TransitionParams params) {