diff options
Diffstat (limited to 'guava-testlib/src/com/google/common/collect/testing/google/ListGenerators.java')
-rw-r--r-- | guava-testlib/src/com/google/common/collect/testing/google/ListGenerators.java | 27 |
1 files changed, 3 insertions, 24 deletions
diff --git a/guava-testlib/src/com/google/common/collect/testing/google/ListGenerators.java b/guava-testlib/src/com/google/common/collect/testing/google/ListGenerators.java index fb14416..e0b7691 100644 --- a/guava-testlib/src/com/google/common/collect/testing/google/ListGenerators.java +++ b/guava-testlib/src/com/google/common/collect/testing/google/ListGenerators.java @@ -20,15 +20,12 @@ import static java.util.Arrays.asList; import com.google.common.annotations.GwtCompatible; import com.google.common.collect.ImmutableList; -import com.google.common.collect.Lists; -import com.google.common.collect.testing.TestCharacterListGenerator; +import com.google.common.collect.ImmutableList.Builder; import com.google.common.collect.testing.TestListGenerator; import com.google.common.collect.testing.TestStringListGenerator; import com.google.common.collect.testing.TestUnhashableCollectionGenerator; import com.google.common.collect.testing.UnhashableObject; -import com.google.common.primitives.Chars; -import java.util.Arrays; import java.util.Collections; import java.util.List; @@ -50,7 +47,7 @@ public final class ListGenerators { public static class BuilderAddListGenerator extends TestStringListGenerator { @Override protected List<String> create(String[] elements) { - ImmutableList.Builder<String> builder = ImmutableList.<String>builder(); + Builder<String> builder = ImmutableList.<String>builder(); for (String element : elements) { builder.add(element); } @@ -66,7 +63,7 @@ public final class ListGenerators { .build(); } } - + public static class BuilderReversedListGenerator extends TestStringListGenerator { @Override protected List<String> create(String[] elements) { @@ -116,24 +113,6 @@ public final class ListGenerators { } } - public static class CharactersOfStringGenerator - extends TestCharacterListGenerator { - @Override public List<Character> create(Character[] elements) { - char[] chars = Chars.toArray(Arrays.asList(elements)); - return Lists.charactersOf(String.copyValueOf(chars)); - } - } - - public static class CharactersOfCharSequenceGenerator - extends TestCharacterListGenerator { - @Override public List<Character> create(Character[] elements) { - char[] chars = Chars.toArray(Arrays.asList(elements)); - StringBuilder str = new StringBuilder(); - str.append(chars); - return Lists.charactersOf(str); - } - } - private abstract static class TestUnhashableListGenerator extends TestUnhashableCollectionGenerator<List<UnhashableObject>> implements TestListGenerator<UnhashableObject> { |