Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| fop 1.0
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.fop.fo.properties
Class PropertyCache

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

public final class PropertyCache
extends java.lang.Object

Dedicated cache, meant for storing canonical instances of property-related classes. The public access points are overloaded `fetch()` methods that each correspond to a cached type. It is designed especially to be used concurrently by multiple threads, drawing heavily upon the principles behind Java 1.5's `ConcurrentHashMap`.

Constructor Summary
`PropertyCache(java.lang.Class c)` Default constructor.

Method Summary
`CommonBorderPaddingBackground.BorderInfo` | `fetch(CommonBorderPaddingBackground.BorderInfo bi)` Checks if the given `CommonBorderPaddingBackground.BorderInfo` is present in the cache - if so, returns a reference to the cached instance.
`CommonBorderPaddingBackground` | `fetch(CommonBorderPaddingBackground cbpb)` Checks if the given `CommonBorderPaddingBackground` is present in the cache - if so, returns a reference to the cached instance.
`CommonFont` | `fetch(CommonFont cf)` Checks if the given `CommonFont` is present in the cache - if so, returns a reference to the cached instance.
`CommonHyphenation` | `fetch(CommonHyphenation chy)` Checks if the given `CommonHyphenation` is present in the cache - if so, returns a reference to the cached instance.
`Marker.MarkerAttribute` | `fetch(Marker.MarkerAttribute ma)` Checks if the given `Marker.MarkerAttribute` is present in the cache - if so, returns a reference to the cached instance.
`Property` | `fetch(Property prop)` Checks if the given `Property` is present in the cache - if so, returns a reference to the cached instance.
`java.lang.String` | `toString()`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Constructor Detail

### PropertyCache

    public PropertyCache(java.lang.Class c)

  Default constructor.

Parameters:
  `c` - Runtime type of the objects that will be stored in the cache

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 instance. Otherwise the given object is added to the cache and returned.

  Parameters:
    `prop` - the Property instance to check for
  Returns:
    the cached instance

### fetch

    public CommonHyphenation fetch(CommonHyphenation chy)

  Checks if the given `CommonHyphenation` is present in the cache - if so, returns a reference to the cached instance. Otherwise the given object is added to the cache and returned.

  Parameters:
    `chy` - the CommonHyphenation instance to check for
  Returns:
    the cached instance

### fetch

    public CommonFont fetch(CommonFont cf)

  Checks if the given `CommonFont` is present in the cache - if so, returns a reference to the cached instance. Otherwise the given object is added to the cache and returned.

  Parameters:
    `cf` - the CommonFont instance to check for
  Returns:
    the cached instance

### fetch

    public CommonBorderPaddingBackground fetch(CommonBorderPaddingBackground cbpb)

  Checks if the given `CommonBorderPaddingBackground` is present in the cache - if so, returns a reference to the cached instance. Otherwise the given object is added to the cache and returned.

  Parameters:
    `cbpb` - the CommonBorderPaddingBackground instance to check for
  Returns:
    the cached instance

### fetch

    public CommonBorderPaddingBackground.BorderInfo fetch(CommonBorderPaddingBackground.BorderInfo bi)

  Checks if the given `CommonBorderPaddingBackground.BorderInfo` is present in the cache - if so, returns a reference to the cached instance. Otherwise the given object is added to the cache and returned.

  Parameters:
    `bi` - the BorderInfo instance to check for
  Returns:
    the cached instance

### fetch

    public Marker.MarkerAttribute fetch(Marker.MarkerAttribute ma)

  Checks if the given `Marker.MarkerAttribute` is present in the cache - if so, returns a reference to the cached instance. Otherwise the given object is added to the cache and returned.

  Parameters:
    `ma` - the MarkerAttribute instance to check for
  Returns:
    the cached instance

### toString

    public java.lang.String toString()

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| fop 1.0
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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