@Override public boolean isEmpty() throws IOException { for (CharSource source : sources) { if (!source.isEmpty()) { return false; } } return true; }
@Override public boolean isEmpty() throws IOException { for (CharSource source : sources) { if (!source.isEmpty()) { return false; } } return true; }
@Override public boolean isEmpty() throws IOException { for (CharSource source : sources) { if (!source.isEmpty()) { return false; } } return true; }
public void testIsEmpty() throws IOException { assertEquals(expected.isEmpty(), source.isEmpty()); }
public void testConcat() throws IOException { CharSource c1 = CharSource.wrap("abc"); CharSource c2 = CharSource.wrap(""); CharSource c3 = CharSource.wrap("de"); String expected = "abcde"; assertEquals(expected, CharSource.concat(ImmutableList.of(c1, c2, c3)).read()); assertEquals(expected, CharSource.concat(c1, c2, c3).read()); assertEquals(expected, CharSource.concat(ImmutableList.of(c1, c2, c3).iterator()).read()); assertFalse(CharSource.concat(c1, c2, c3).isEmpty()); CharSource emptyConcat = CharSource.concat(CharSource.empty(), CharSource.empty()); assertTrue(emptyConcat.isEmpty()); }
@Override public boolean isEmpty() throws IOException { for (CharSource source : sources) { if (!source.isEmpty()) { return false; } } return true; }
@Override public boolean isEmpty() throws IOException { for (CharSource source : sources) { if (!source.isEmpty()) { return false; } } return true; }
@Override public boolean isEmpty() throws IOException { for (CharSource source : sources) { if (!source.isEmpty()) { return false; } } return true; }
@Override public boolean isEmpty() throws IOException { for (CharSource source : sources) { if (!source.isEmpty()) { return false; } } return true; }
@Override public boolean isEmpty() throws IOException { for (CharSource source : sources) { if (!source.isEmpty()) { return false; } } return true; }
@Override public boolean isEmpty() throws IOException { for (CharSource source : sources) { if (!source.isEmpty()) { return false; } } return true; }
@Override public boolean isEmpty() throws IOException { for (CharSource source : sources) { if (!source.isEmpty()) { return false; } } return true; }
@Override public boolean isEmpty() throws IOException { for (CharSource source : sources) { if (!source.isEmpty()) { return false; } } return true; }
public void testIsEmpty() throws IOException { assertEquals(expected.isEmpty(), source.isEmpty()); }
public void testConcat() throws IOException { CharSource c1 = CharSource.wrap("abc"); CharSource c2 = CharSource.wrap(""); CharSource c3 = CharSource.wrap("de"); String expected = "abcde"; assertEquals(expected, CharSource.concat(ImmutableList.of(c1, c2, c3)).read()); assertEquals(expected, CharSource.concat(c1, c2, c3).read()); assertEquals(expected, CharSource.concat(ImmutableList.of(c1, c2, c3).iterator()).read()); assertFalse(CharSource.concat(c1, c2, c3).isEmpty()); CharSource emptyConcat = CharSource.concat(CharSource.empty(), CharSource.empty()); assertTrue(emptyConcat.isEmpty()); }