K
- type of font identifierE
- type of exception thrown in case of failure to retrieve the cached datapublic interface FontAttributesCache<K extends Serializable,E extends Throwable> extends Provider<Collection<FontSource>,E>
FontAttributeSet
cache implementations.Modifier and Type | Method and Description |
---|---|
void |
add(K identifier,
FontAttributeSet attributes)
Adds a pair of an identifier for a font and the
FontAttributeSet for that font to the
cache. |
Map<K,FontAttributeSet> |
getAllEntries()
Get all entries which are currently stored in the cache
|
FontAttributeSet |
getFontAttributesEntry(K identifier)
Get the
FontAttributeSet cached for the font identified by the given identifier |
void |
invalidateCache()
Removes all entries from the cache.
|
void |
remove(K identifier)
Removes the
FontAttributeSet for the font identified by the given identifier. |
void |
writeCache()
Persists the cache.
|
void add(K identifier, FontAttributeSet attributes)
FontAttributeSet
for that font to the
cache.identifier
- an object identifying the font.attributes
- the FontAttributeSet
for the font to be addedvoid remove(K identifier)
FontAttributeSet
for the font identified by the given identifier. If there
was no information stored for the given identifier nothing happens.identifier
- the identifier of the entry to remove the information for.void invalidateCache()
Map<K,FontAttributeSet> getAllEntries()
FontAttributeSet getFontAttributesEntry(K identifier)
FontAttributeSet
cached for the font identified by the given identifieridentifier
- The identifier of the fontFontAttributeSet
for the font identified by the given identifier as stored in
the cache.null
may be returned if either there is no entry for the identifier or if
the FontAttributeSet
for the font are null
.Copyright © 2024 levigo holding gmbh. All rights reserved.