All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.openpdf.renderer.function.postscript.operation.And Maven / Gradle / Ivy

The newest version!
package org.openpdf.renderer.function.postscript.operation;

import java.util.Stack;

final class And implements PostScriptOperation {
	@Override
	/**
	 * bool1|int1 bool2|int2 and bool3|int3 

* * returns the logical conjunction of the operands * if they are boolean. If the operands are integers, * and returns the bitwise "and" of their binary * representations.

* * errors: stackunderflow, typecheck */ public void eval(Stack environment) { environment.push((Long)environment.pop() & (Long)environment.pop()); } }