Package org.daisy.dotify.hyphenator.impl
Class JHyphenatorFactory
- java.lang.Object
-
- org.daisy.dotify.hyphenator.impl.JHyphenatorFactory
-
- All Implemented Interfaces:
HyphenatorFactory
public class JHyphenatorFactory extends Object implements HyphenatorFactory
Provides a hyphenator factory that uses jhyphen.
-
-
Field Summary
-
Fields inherited from interface org.daisy.dotify.api.hyphenator.HyphenatorFactory
FEATURE_HYPHENATION_ACCURACY
-
-
Constructor Summary
Constructors Constructor Description JHyphenatorFactory()
-
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.
-
-
-
Method Detail
-
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
-
-