public final class PropertyCache
extends java.lang.Object
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 and Description |
---|
PropertyCache(java.lang.Class c)
Default constructor.
|
Modifier and Type | Method and Description |
---|---|
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() |
public PropertyCache(java.lang.Class c)
c
- Runtime type of the objects that will be stored in the cachepublic Property fetch(Property prop)
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.prop
- the Property instance to check forpublic CommonHyphenation fetch(CommonHyphenation chy)
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.chy
- the CommonHyphenation instance to check forpublic CommonFont fetch(CommonFont cf)
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.cf
- the CommonFont instance to check forpublic CommonBorderPaddingBackground fetch(CommonBorderPaddingBackground cbpb)
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.cbpb
- the CommonBorderPaddingBackground instance to check forpublic CommonBorderPaddingBackground.BorderInfo fetch(CommonBorderPaddingBackground.BorderInfo bi)
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.bi
- the BorderInfo instance to check forpublic Marker.MarkerAttribute fetch(Marker.MarkerAttribute ma)
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.ma
- the MarkerAttribute instance to check forpublic java.lang.String toString()
toString
in class java.lang.Object
Copyright 1999-2010 The Apache Software Foundation. All Rights Reserved.