|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectTextMessage
public class TextMessage
TextMessage - a class for a text message.
Used by, for example, PhoneKeypad
(do not delete).
Method Summary | |
---|---|
void |
addWord(java.lang.String s)
Add word to end of text message. |
void |
appendCharacter(char c)
Appends a character to the last word in the text message. |
void |
clear()
Clear the text message. |
int |
getCharacter(int i)
Returns the character at position i. |
java.lang.String |
getCodedMessage()
Returns message as series of codes (as per phone keypad). |
java.lang.String |
getMessage()
Returns the text message as a string. |
int |
getSize()
Returns the size of the text message, in characters. |
int |
getWordCount()
Returns the number of words in the text message. |
static void |
main(java.lang.String[] args)
Test the TextMessage class. |
void |
printMessage()
Print the text message on the console. |
void |
replaceLast(java.lang.String s)
Replace last word in message with passed word. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public java.lang.String getMessage()
public int getSize()
public int getWordCount()
public int getCharacter(int i)
public java.lang.String getCodedMessage()
public void addWord(java.lang.String s)
public void replaceLast(java.lang.String s)
public void appendCharacter(char c)
public void clear()
public void printMessage()
public static void main(java.lang.String[] args)
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |