fop 0.94

org.apache.fop.fo.properties
Class PropertyCache

java.lang.Object
  extended by org.apache.fop.fo.properties.PropertyCache

public class PropertyCache
extends java.lang.Object

Thin wrapper around a HashMap to implement the property caching idiom in which a new Property instance is created then tested against cached instances created previously. If an existing property is found, this is retained and the newly created one is instantly eligible for garbage collection.


Constructor Summary
PropertyCache()
           
 
Method Summary
 Property fetch(Property prop)
          Checks if the given property is present in the cache - if so, returns a reference to the cached value.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PropertyCache

public PropertyCache()
Method Detail

fetch

public Property fetch(Property prop)
Checks if the given property is present in the cache - if so, returns a reference to the cached value. Otherwise the given object is added to the cache and returned.

Parameters:
obj -
Returns:
the cached instance

fop 0.94

Copyright 1999-2007 The Apache Software Foundation. All Rights Reserved.