Code example for Deque

Methods: isEmpty, pop, push

0
 * @version 3.0 
 */ 
public class PSCeilingCommand extends PSArithemticCommand { 
	@Override 
	public void execute(final Deque<String> stack, final double x) throws InvalidFormatPSFunctionException {
		if(stack==null || stack.isEmpty())
			throw new InvalidFormatPSFunctionException(); 
 
		stack.push(String.valueOf(Math.ceil(Double.parseDouble(stack.pop()))));
	} 
}