Package org.apache.xpath.axes
Class IteratorPool
java.lang.Object
org.apache.xpath.axes.IteratorPool
- All Implemented Interfaces:
Serializable
public final class IteratorPool extends Object implements Serializable
Pool of object of a given type to pick from to help memory usage
- See Also:
- Serialized Form
-
Constructor Summary
Constructors Constructor Description IteratorPool(DTMIterator original)Constructor IteratorPool -
Method Summary
Modifier and Type Method Description voidfreeInstance(DTMIterator obj)Add an instance of the given object to the poolDTMIteratorgetInstance()Get an instance of the given object in this poolDTMIteratorgetInstanceOrThrow()Get an instance of the given object in this pool
-
Constructor Details
-
IteratorPool
Constructor IteratorPool- Parameters:
original- The original iterator from which all others will be cloned.
-
-
Method Details
-
getInstanceOrThrow
Get an instance of the given object in this pool- Returns:
- An instance of the given object
- Throws:
CloneNotSupportedException
-
getInstance
Get an instance of the given object in this pool- Returns:
- An instance of the given object
-
freeInstance
Add an instance of the given object to the pool- Parameters:
obj- Object to add.
-