Package ca.phon.orthography
Class Orthography
java.lang.Object
ca.phon.orthography.Orthography
- All Implemented Interfaces:
IExtendable
,Visitable<OrthoElement>
,Iterable<OrthoElement>
public class Orthography
extends Object
implements Iterable<OrthoElement>, Visitable<OrthoElement>, IExtendable
Container for orthographic transcriptions. This class is immutable after being created.
To append/modify the data in the Orthography, use the
OrthographyBuilder
class to create
a modified Orthography
instance.-
Constructor Summary
ConstructorDescriptionOrthography
(OrthoElement[] eles) Orthography
(Collection<? extends OrthoElement> elements) -
Method Summary
Modifier and TypeMethodDescriptionvoid
accept
(Visitor<OrthoElement> visitor) Accept the given visitor.elementAt
(int idx) <T> T
getExtension
(Class<T> cap) Get the requested extension if available.Return all extension types supportedint
indexOf
(OrthoElement ele) iterator()
int
length()
static Orthography
parseOrthography
(String text) Parse the given text into a newOrthography
object.<T> T
putExtension
(Class<T> cap, T impl) Add a new extension.<T> T
removeExtension
(Class<T> cap) Remove a capability.subsection
(int start, int end) toList()
toString()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
Orthography
public Orthography() -
Orthography
-
Orthography
-
-
Method Details
-
parseOrthography
Parse the given text into a newOrthography
object.- Throws:
ParseException
-
getExtensions
Description copied from interface:IExtendable
Return all extension types supported- Specified by:
getExtensions
in interfaceIExtendable
-
getExtension
Description copied from interface:IExtendable
Get the requested extension if available.- Specified by:
getExtension
in interfaceIExtendable
- Returns:
- the capability object or
null
if the cability is not available
-
putExtension
Description copied from interface:IExtendable
Add a new extension.- Specified by:
putExtension
in interfaceIExtendable
- Parameters:
cap
- the extension to add- Returns:
- the added extension implementation
-
removeExtension
Description copied from interface:IExtendable
Remove a capability.- Specified by:
removeExtension
in interfaceIExtendable
- Parameters:
cap
- the capability to remove
-
accept
Description copied from interface:Visitable
Accept the given visitor.- Specified by:
accept
in interfaceVisitable<OrthoElement>
-
subsection
-
length
public int length() -
elementAt
-
indexOf
-
toString
-
toList
-
iterator
- Specified by:
iterator
in interfaceIterable<OrthoElement>
-