IMorseEncoder
public interface IMorseEncoder
Declares functionality to encode text by Morse code.
Methods
Method | Description |
---|---|
encode(String text, MorseAlphabets alphabet) | Encodes text by Morse code. |
encode(String text, MorseAlphabets alphabet, char inputSeparator) | Encodes text by Morse code. |
encode(String text, MorseAlphabets alphabet, char inputSeparator, char outputSeparator) | Encodes text by Morse code. |
encode(String text) | Encodes text by Morse code. |
encode(String text, char inputSeparator) | Encodes text by Morse code. |
encode(String text, char inputSeparator, char outputSeparator) | Encodes text by Morse code. |
encode(String text, MorseAlphabets alphabet)
public abstract String encode(String text, MorseAlphabets alphabet)
Encodes text by Morse code.
Parameters:
Parameter | Type | Description |
---|---|---|
text | java.lang.String | Text to encode by Morse code. |
alphabet | MorseAlphabets | Alphabet of Morse code. |
Returns: java.lang.String - Encoded text, ie “… — …” for the input text “SOS”.
encode(String text, MorseAlphabets alphabet, char inputSeparator)
public abstract String encode(String text, MorseAlphabets alphabet, char inputSeparator)
Encodes text by Morse code.
Parameters:
Parameter | Type | Description |
---|---|---|
text | java.lang.String | Text to encode by Morse code. |
alphabet | MorseAlphabets | Alphabet of Morse code. |
inputSeparator | char | Symbol used to separate words in input text. |
Returns: java.lang.String - Encoded text, ie “… — …” for the input text “SOS”.
encode(String text, MorseAlphabets alphabet, char inputSeparator, char outputSeparator)
public abstract String encode(String text, MorseAlphabets alphabet, char inputSeparator, char outputSeparator)
Encodes text by Morse code.
Parameters:
Parameter | Type | Description |
---|---|---|
text | java.lang.String | Text to encode by Morse code. |
alphabet | MorseAlphabets | Alphabet of Morse code. |
inputSeparator | char | Symbol used to separate words in input text. |
outputSeparator | char | Symbol used to separate words in encoded text. |
Returns: java.lang.String - Encoded text, ie “… — …” for the input text “SOS”.
encode(String text)
public abstract String encode(String text)
Encodes text by Morse code. Heuristic analysis is used to calculate the alphabet of the input text. The alphabet is selected by the first word.
Parameters:
Parameter | Type | Description |
---|---|---|
text | java.lang.String | Text to encode by Morse code. |
Returns: java.lang.String - Encoded text, i.e. “… — …” for the input text “SOS”.
encode(String text, char inputSeparator)
public abstract String encode(String text, char inputSeparator)
Encodes text by Morse code. Heuristic analysis is used to calculate the alphabet of the input text. The alphabet is selected by the first word.
Parameters:
Parameter | Type | Description |
---|---|---|
text | java.lang.String | Text to encode by Morse code. |
inputSeparator | char | Symbol used to separate words in input text. |
Returns: java.lang.String - Encoded text, i.e. “… — …” for the input text “SOS”.
encode(String text, char inputSeparator, char outputSeparator)
public abstract String encode(String text, char inputSeparator, char outputSeparator)
Encodes text by Morse code. Heuristic analysis is used to calculate the alphabet of the input text. The alphabet is selected by the first word.
Parameters:
Parameter | Type | Description |
---|---|---|
text | java.lang.String | Text to encode by Morse code. |
inputSeparator | char | Symbol used to separate words in input text. |
outputSeparator | char | Symbol used to separate words in encoded text. |
Returns: java.lang.String - Encoded text, i.e. “… — …” for the input text “SOS”.