AttributedStringBuilder extends AttributedCharSequence implements Appendable { public AttributedStringBuilder tabs(int tabsize) { if (tabsize < 0) { throw new IllegalArgumentException("Tab size must be non negative"); } return tabs(Arrays.asList(tabsize)); } AttributedStringBuilder();  AttributedStringBuilder(int capacity); static AttributedString append(CharSequence... strings); @Override int length(); @Override char charAt(int index); @Override AttributedStyle styleAt(int index); @Override AttributedString subSequence(int start, int end); @Override AttributedStringBuilder append(CharSequence csq); @Override AttributedStringBuilder append(CharSequence csq, int start, int end); @Override AttributedStringBuilder append(char c); AttributedStringBuilder append(CharSequence csq, AttributedStyle style); AttributedStringBuilder style(AttributedStyle style); AttributedStringBuilder style(Function<AttributedStyle,AttributedStyle> style); AttributedStringBuilder styled(Function<AttributedStyle,AttributedStyle> style, CharSequence cs); AttributedStringBuilder styled(AttributedStyle style, CharSequence cs); AttributedStringBuilder styled(Function<AttributedStyle,AttributedStyle> style, Consumer<AttributedStringBuilder> consumer); AttributedStyle style(); AttributedStringBuilder append(AttributedString str); AttributedStringBuilder append(AttributedString str, int start, int end); AttributedStringBuilder append(AttributedCharSequence str); AttributedStringBuilder append(AttributedCharSequence str, int start, int end); void appendAnsi(String ansi); AttributedStringBuilder ansiAppend(String ansi); void setLength(int l); AttributedStringBuilder tabs(int tabsize); AttributedStringBuilder tabs(List<Integer> tabs); AttributedStringBuilder styleMatches(Pattern pattern, AttributedStyle s); AttributedStringBuilder styleMatches(Pattern pattern, List<AttributedStyle> styles);  }
@Test(expected=IllegalArgumentException.class) public void testNegativeTabSize() throws Exception { @SuppressWarnings("unused") AttributedStringBuilder sb = new AttributedStringBuilder().tabs(-1); }