com.jrefinery.report.targets.pageable
Class Spool

java.lang.Object
  extended bycom.jrefinery.report.targets.pageable.Spool
All Implemented Interfaces:
java.lang.Cloneable, PhysicalOperationsCollector

public class Spool
extends java.lang.Object
implements java.lang.Cloneable, PhysicalOperationsCollector

A spool is a sequence of operations (instances of PhysicalOperation) that can be applied to an OutputTarget.

Author:
Thomas Morgner.

Constructor Summary
Spool()
          Creates a new spool.
 
Method Summary
 void addOperation(PhysicalOperation op)
          Adds an operation to the spool.
 java.lang.Object clone()
          Clones the spool.
 PhysicalOperation[] getOperations()
          Returns an array of operations.
 boolean isEmpty()
          Checks whether this spool contains operations.
 void merge(Spool spool)
          Appends the operations stored in a spool to the end of this spool's list.
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Spool

public Spool()
Creates a new spool.

Method Detail

isEmpty

public boolean isEmpty()
Checks whether this spool contains operations.

Returns:
true, if the spool is empty, false otherwise.

getOperations

public PhysicalOperation[] getOperations()
Returns an array of operations.

Returns:
an array of operations.

addOperation

public void addOperation(PhysicalOperation op)
Adds an operation to the spool.

Specified by:
addOperation in interface PhysicalOperationsCollector
Parameters:
op - the operation.

merge

public void merge(Spool spool)
Appends the operations stored in a spool to the end of this spool's list.

Parameters:
spool - the spool.

clone

public java.lang.Object clone()
                       throws java.lang.CloneNotSupportedException
Clones the spool.

Returns:
the clone.
Throws:
java.lang.CloneNotSupportedException - if cloning is not supported.