Package games.stendhal.common.parser
Class SentenceBuilder
java.lang.Object
games.stendhal.common.parser.SentenceBuilder
This utility class is used to create string representations of sentences by separating words by space characters.
- Author:
- Martin Fuchs
-
Constructor Summary
-
Method Summary
-
Constructor Details
-
SentenceBuilder
public SentenceBuilder() -
SentenceBuilder
public SentenceBuilder(char separator)
-
-
Method Details
-
append
Append string separated by space.- Parameters:
s
-
-
append
public void append(char c)Directly append the given character.- Parameters:
c
-
-
appendUntilBreak
Append a sequence of Expressions until we find a break flag or there is no more Expression.- Parameters:
it
- Expression iterator- Returns:
- amount of appended tokens
-
isEmpty
public boolean isEmpty()Check for empty buffer content.- Returns:
- true, if the builder is empty
-
toString
-