
public class Sentence extends Object implements CharSequence
| Constructor and Description |
|---|
Sentence()
Creates a new sentence
|
| Modifier and Type | Method and Description |
|---|---|
Sentence |
append(char c)
Appends a character to sentence
|
Sentence |
append(CharSequence s)
Appends a character sequence to sentence
|
char |
charAt(int index) |
boolean |
isEmpty()
Checks whether sentence is empty, that is does not contain any characters
|
boolean |
isFinished()
Checks whether sentence is finished by newline character(s)
|
int |
length() |
Sentence |
reset()
Clears the sentence
|
CharSequence |
subSequence(int start,
int end) |
String |
toString() |
Sentence |
trim()
Removes a newline character(s) from the end of sentence, if any
|
public Sentence append(CharSequence s)
s - sequencepublic Sentence append(char c)
c - characterpublic boolean isFinished()
public boolean isEmpty()
public Sentence trim()
public Sentence reset()
public String toString()
toString in interface CharSequencetoString in class Objectpublic int length()
length in interface CharSequencepublic char charAt(int index)
charAt in interface CharSequencepublic CharSequence subSequence(int start, int end)
subSequence in interface CharSequenceCopyright © 2014 JBoss by Red Hat. All rights reserved.