IMorseEncoder

public interface IMorseEncoder

Declares functionality to encode text by Morse code.

Methods

MethodDescription
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:

ParameterTypeDescription
textjava.lang.StringText to encode by Morse code.
alphabetMorseAlphabetsAlphabet 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:

ParameterTypeDescription
textjava.lang.StringText to encode by Morse code.
alphabetMorseAlphabetsAlphabet of Morse code.
inputSeparatorcharSymbol 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:

ParameterTypeDescription
textjava.lang.StringText to encode by Morse code.
alphabetMorseAlphabetsAlphabet of Morse code.
inputSeparatorcharSymbol used to separate words in input text.
outputSeparatorcharSymbol 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:

ParameterTypeDescription
textjava.lang.StringText 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:

ParameterTypeDescription
textjava.lang.StringText to encode by Morse code.
inputSeparatorcharSymbol 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:

ParameterTypeDescription
textjava.lang.StringText to encode by Morse code.
inputSeparatorcharSymbol used to separate words in input text.
outputSeparatorcharSymbol used to separate words in encoded text.

Returns: java.lang.String - Encoded text, i.e. “… — …” for the input text “SOS”.