org.foray.ps
Class PsArrayExecuting

java.lang.Object
  extended by org.foray.ps.PsObjectComposite
      extended by org.foray.ps.PsArrayExecuting
All Implemented Interfaces:
PsObject

public class PsArrayExecuting
extends PsObjectComposite

A wrapper around an instance of PsArray, acting as an iterator over its content.


Constructor Summary
PsArrayExecuting(PsArray wrappedArray)
          Constructor.
 
Method Summary
 PsObject duplicate()
          This is a shallow copy.
 PsObject getNextProcedureItem()
          Returns the next item in this procedure.
 PsName getTypeName()
          Needed for the "type" operator.
 boolean isComparable(PsObject object)
          Test the comparability of two PSObjects.
 boolean isComposite()
          The method should be overridden by composite objects.
 boolean isExecutable()
          Indicates whether this object is executable.
 int qtyUnexecutedItems()
          Returns the count of unexecuted items.
 
Methods inherited from class org.foray.ps.PsObjectComposite
getAccess, setAccess
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PsArrayExecuting

public PsArrayExecuting(PsArray wrappedArray)
Constructor.

Parameters:
wrappedArray - The array whose contents are iterated. This array must be executable.
Method Detail

getNextProcedureItem

public PsObject getNextProcedureItem()
Returns the next item in this procedure.

Returns:
The next item in this procedure.

qtyUnexecutedItems

public int qtyUnexecutedItems()
Returns the count of unexecuted items.

Returns:
The count of unexecuted items.

isComparable

public boolean isComparable(PsObject object)
Description copied from interface: PsObject
Test the comparability of two PSObjects. Used in the eq, ne, lt, etc. operators.

Parameters:
object - The object that should be tested for comparability.
Returns:
True if this is comparable to object, false otherwise.

getTypeName

public PsName getTypeName()
Description copied from interface: PsObject
Needed for the "type" operator.

Returns:
The type name as defined in PSRM2, Chapter 8, "type" operator.

isExecutable

public boolean isExecutable()
Description copied from interface: PsObject
Indicates whether this object is executable.

Returns:
True iff this object is executable.

duplicate

public PsObject duplicate()
Description copied from interface: PsObject
This is a shallow copy. Specifically, composite objects should generally return themselves. Simple objects should return copies of themselves.

Returns:
A duplicate of this that conforms to what is expected by the "dup" operator.

isComposite

public boolean isComposite()
Description copied from interface: PsObject
The method should be overridden by composite objects.

Returns:
True iff this object is a composite PostScript object.


Copyright © 2017. All rights reserved.