public class HyphenationTreeCache
extends java.lang.Object
Constructor and Description |
---|
HyphenationTreeCache() |
Modifier and Type | Method and Description |
---|---|
void |
cache(java.lang.String key,
HyphenationTree hTree)
Cache a hyphenation tree under its key.
|
static java.lang.String |
constructKey(java.lang.String lang,
java.lang.String country)
Constructs the key for the hyphenation pattern file.
|
HyphenationTree |
getHyphenationTree(java.lang.String lang,
java.lang.String country)
Looks in the cache if a hyphenation tree is available and returns it if it is found.
|
boolean |
isMissing(java.lang.String key)
Indicates whether a hyphenation file has been requested before but it wasn't available.
|
void |
noteMissing(java.lang.String key)
Notes a key to a hyphenation tree as missing.
|
public HyphenationTree getHyphenationTree(java.lang.String lang, java.lang.String country)
lang
- the languagecountry
- the country (may be null or "none")public static java.lang.String constructKey(java.lang.String lang, java.lang.String country)
lang
- the languagecountry
- the country (may be null or "none")public void cache(java.lang.String key, HyphenationTree hTree)
key
- the key (ex. "de_CH" or "en")hTree
- the hyphenation treepublic void noteMissing(java.lang.String key)
key
- the key (ex. "de_CH" or "en")public boolean isMissing(java.lang.String key)
key
- the key (ex. "de_CH" or "en")Copyright 1999-2010 The Apache Software Foundation. All Rights Reserved.