Package org.daisy.dotify.hyphenator.impl
Class CWHyphenatorFactory
- java.lang.Object
-
- org.daisy.dotify.hyphenator.impl.CWHyphenatorFactory
-
- All Implemented Interfaces:
HyphenatorFactory
public class CWHyphenatorFactory extends Object implements HyphenatorFactory
Provides a hyphenator factory for compound words.
-
-
Field Summary
-
Fields inherited from interface org.daisy.dotify.api.hyphenator.HyphenatorFactory
FEATURE_HYPHENATION_ACCURACY
-
-
Constructor Summary
Constructors Constructor Description CWHyphenatorFactory()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Object
getFeature(String key)
Gets the value of a hyphenation feature.HyphenatorInterface
newHyphenator(String locale)
Returns a new hyphenator configured for the specified locale.void
setFeature(String key, Object value)
Sets the value of a hyphenation feature.boolean
supportsLocale(String locale)
Returns true if the specified locale is supported, false otherwise.
-
-
-
Method Detail
-
supportsLocale
public boolean supportsLocale(String locale)
Returns true if the specified locale is supported, false otherwise.- Parameters:
locale
- the locale to test- Returns:
- returns true if the locale is supported, false otherwise
-
newHyphenator
public HyphenatorInterface newHyphenator(String locale) throws HyphenatorConfigurationException
Description copied from interface:HyphenatorFactory
Returns a new hyphenator configured for the specified locale.- Specified by:
newHyphenator
in interfaceHyphenatorFactory
- Parameters:
locale
- a valid locale for the new hyphenator, as defined by IETF RFC 3066- Returns:
- returns a new hyphenator
- Throws:
HyphenatorConfigurationException
- if the locale is not supported
-
getFeature
public Object getFeature(String key)
Description copied from interface:HyphenatorFactory
Gets the value of a hyphenation feature.- Specified by:
getFeature
in interfaceHyphenatorFactory
- Parameters:
key
- the feature to get the value for- Returns:
- returns the value, or null if not set
-
setFeature
public void setFeature(String key, Object value) throws HyphenatorConfigurationException
Description copied from interface:HyphenatorFactory
Sets the value of a hyphenation feature.- Specified by:
setFeature
in interfaceHyphenatorFactory
- Parameters:
key
- the feature to set the value forvalue
- the value for the feature- Throws:
HyphenatorConfigurationException
- if the feature is not supported
-
-