Skip to content

Commit

Permalink
Add getSentences method in TextField
Browse files Browse the repository at this point in the history
  • Loading branch information
manosetro committed May 9, 2017
1 parent 729870c commit 80f2056
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,15 @@ public void setParagraphs(List<Paragraph> paragraphs) {
this.paragraphs = paragraphs;
}

public List<Sentence> getSentences() {
List<Sentence> sentences = new ArrayList<Sentence>();
for(Paragraph paragraph : paragraphs) {
List<Sentence> paragraphSentences = paragraph.getSentences();
sentences.addAll(paragraphSentences);
}
return sentences;
}

public String getValue() {
StringBuffer buffer = new StringBuffer();
for(Paragraph paragraph : paragraphs) {
Expand Down

0 comments on commit 80f2056

Please sign in to comment.