net.sf.jasperreports.engine.fill

## Class JRClonePool

- java.lang.Object
- - net.sf.jasperreports.engine.fill.JRClonePool

-     public class JRClonePool
      extends java.lang.Object

  Working clones pooling utility used at fill time.
  Version:
    $Id: JRClonePool.java 5878 2013-01-07 20:23:13Z teodord $
  Author:
    Lucian Chirita (lucianc@users.sourceforge.net)

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `JRClonePool(JRFillCloneable original, boolean trackLockedClones, boolean useOriginal)` Creates a clone pool.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.lang.Object` | `getClone()` Retrieves a clone from the pool.
    `void` | `releaseClone(java.lang.Object clone)` Release the clone back to the pool.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### JRClonePool

          public JRClonePool(JRFillCloneable original,
                     boolean trackLockedClones,
                     boolean useOriginal)

      Creates a clone pool.
      Parameters:
        `original` - the original element that will be cloned
        `trackLockedClones` - whether to track clones retrieved from the pool

        If set, the pool will keep a set of in-use clones and the caller will always have to release the clones back to the pool.

        `useOriginal` - whether the original object can be used as a working clone

  - ### Method Detail

    - #### getClone

          public java.lang.Object getClone()

      Retrieves a clone from the pool.

      The clone is reserved to the caller who will need to call `releaseClone(Object)` to release it back to the pool.

      Returns:
        a clone of the original object

    - #### releaseClone

          public void releaseClone(java.lang.Object clone)

      Release the clone back to the pool. The clone will be available for other clients.
      Parameters:
        `clone` - the clone to be released

© 2001-2010 Jaspersoft Corporation www.jaspersoft.com