Code example for Queue

Methods: add, isEmpty, poll

0
	public int size() { 
		return actions.size(); 
	} 
	 
	public Action poolCurrentAction() { 
		if(actions.isEmpty()) { 
			return null; 
		} 
		Action next = actions.poll(); 
		if(loop) { 
			next.reset(); 
			actions.add(next); 
		} 
		return next; 
	} 
	 
	public String toString() { 
		return actions.toString() + (loop ? " loop "  : ""); 
	} 
	 
}