Package org.daisy.dotify.translator
Class SimpleMarkerDictionary
- java.lang.Object
-
- org.daisy.dotify.translator.SimpleMarkerDictionary
-
- All Implemented Interfaces:
MarkerDictionary
public class SimpleMarkerDictionary extends Object implements MarkerDictionary
Provides a simple marker dictionary which contains one entry only.
-
-
Constructor Summary
Constructors Constructor Description SimpleMarkerDictionary(Marker def)
Creates a new instance with the supplied marker.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Marker
getMarkersFor(String str, TextAttribute attributes)
Gets the markers that apply to the specified string.
-
-
-
Constructor Detail
-
SimpleMarkerDictionary
public SimpleMarkerDictionary(Marker def)
Creates a new instance with the supplied marker.- Parameters:
def
- the marker to apply regardless of the contents
-
-
Method Detail
-
getMarkersFor
public Marker getMarkersFor(String str, TextAttribute attributes) throws MarkerNotFoundException, MarkerNotCompatibleException
Description copied from interface:MarkerDictionary
Gets the markers that apply to the specified string.- Specified by:
getMarkersFor
in interfaceMarkerDictionary
- Parameters:
str
- the string to find markers forattributes
- the attributes for the string- Returns:
- returns markers that apply to the input
- Throws:
MarkerNotFoundException
- if no markers apply to the supplied stringMarkerNotCompatibleException
- if the markers cannot be applied to the attribute structure
-
-