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

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

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

import java.util.Stack;

final class Dup implements PostScriptOperation {
	@Override
	/**
	 * any dup any any 

* * duplicates the top element on the operand stack. * dup copies only the object; the value of a composite * object is not copied but is shared. * See Section 3.3, "Data Types and Objects."

* * errors: stackoverflow, stackunderflow */ public void eval(Stack environment) { Object obj = environment.pop(); environment.push(obj); environment.push(obj); } }