Esempio n. 1
0
 @NotNull
 public String getText() {
   String text = myText;
   if (text != null) return text;
   final StringBuilder consolidatedText = new StringBuilder();
   for (final XmlTagChild element : myElements) {
     consolidatedText.append(element.getText());
   }
   return myText = consolidatedText.toString();
 }
Esempio n. 2
0
  @NotNull
  public String getTrimmedText() {
    String trimmedText = myTrimmedText;
    if (trimmedText != null) return trimmedText;

    final StringBuilder consolidatedText = new StringBuilder();
    final XmlText[] textElements = getTextElements();
    for (final XmlText textElement : textElements) {
      consolidatedText.append(textElement.getValue());
    }
    return myTrimmedText = consolidatedText.toString().trim();
  }