Text implements ParagraphElement { public boolean isEmpty() { return this.paragraphs.isEmpty(); } Text(final List<Paragraph> paragraphs); static TextBuilder builder(); static Text content(final String text); static Text styledContent(final String text, final TextStyle ts); @Override void addEmbeddedStylesFromCell(final StylesContainer stylesContainer); @Override void addEmbeddedStylesFromFooterHeader(final StylesContainer stylesContainer); @Override void appendXMLContent(final XMLUtil util, final Appendable appendable); boolean isEmpty(); @Override boolean equals(final Object o); @Override final int hashCode(); static final String TEXT_DATE; static final String TEXT_FILE_NAME; static final String TEXT_PAGE_COUNT; static final String TEXT_PAGE_NUMBER; static final String TEXT_SHEET_NAME; static final String TEXT_TIME; }
@Test public void empty() throws Exception { final Text t = TextBuilder.create().build(); TestHelper.assertXMLEquals("", t); Assert.assertTrue(t.isEmpty()); }