cc.redberry.core.context
Interface IndexSymbolConverter
-
- All Known Implementing Classes:
- GreekLaTeXLowerCaseConverter, GreekLaTeXUpperCaseConverter, IndexConverterExtender, IndexWithStrokeConverter, LatinLowerCaseConverter, LatinUpperCaseConverter
public interface IndexSymbolConverterInterface, which states common functionality of string-integer converter for indices of the same particular type.- Since:
- 1.0
- See Also:
IndicesUtils
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method and Description booleanapplicableToSymbol(java.lang.String symbol)Returns true if this converter can convert index string to integer representationintgetCode(java.lang.String symbol)Returns integer representation from specified string representation of single index.java.lang.StringgetSymbol(int code, OutputFormat outputFormat)Returns string representation from specified integer representation of single index in the specifiedoutputFormat.bytegetType()Returns the type of indices, which this converter processes.intmaxNumberOfSymbols()Returns the number of symbols, supported by this converter.
-
-
-
Method Detail
-
applicableToSymbol
boolean applicableToSymbol(java.lang.String symbol)
Returns true if this converter can convert index string to integer representation- Parameters:
symbol- index string representation- Returns:
- true, if this converter can convert index string to integer representation
-
getSymbol
java.lang.String getSymbol(int code, OutputFormat outputFormat) throws IndexConverterExceptionReturns string representation from specified integer representation of single index in the specifiedoutputFormat.- Parameters:
code- index integer representationoutputFormat- output format- Returns:
- string representation of specified integer index, according to the specified output format
- Throws:
IndexConverterException- if code does not corresponds to this converter- See Also:
OutputFormat
-
getCode
int getCode(java.lang.String symbol) throws IndexConverterExceptionReturns integer representation from specified string representation of single index.- Parameters:
symbol- index string representation- Returns:
- index integer representation
- Throws:
IndexConverterException- if converter does not applicable to specified symbol
-
maxNumberOfSymbols
int maxNumberOfSymbols()
Returns the number of symbols, supported by this converter. For exampleLatinLowerCaseConvertersupports 26 symbols (Latin alphabet size).- Returns:
- the number of symbols, supported by this converter
-
getType
byte getType()
Returns the type of indices, which this converter processes. The type value is unique for each converter.- Returns:
- type of indices, which this converter process
-
-
DataMelt 3.0 © DataMelt by jWork.ORG