@Test public void testIntern() { StringList l1 = new StringList("a"); StringList l2 = new StringList("a", "b"); Assert.assertTrue(l1.getToken(0) == l2.getToken(0)); }
public String getToken(int index) { return tokens[index]; }
StringList implements Iterable<String> { public String getToken(int index) { return tokens[index]; } }
StringList implements Iterable<String> { public String getToken(int index) { return tokens[index]; } StringList(String singleToken);  StringList(String... tokens); }
StringList implements Iterable<String> { public String getToken(int index) { return tokens[index]; } StringList(String singleToken);  StringList(String... tokens); String getToken(int index); int size(); Iterator<String> iterator(); boolean compareToIgnoreCase(StringList tokens); @Override int hashCode(); @Override boolean equals(Object obj); @Override String toString(); }
StringList implements Iterable<String> { public String getToken(int index) { return tokens[index]; } StringList(String singleToken);  StringList(String... tokens); String getToken(int index); int size(); Iterator<String> iterator(); boolean compareToIgnoreCase(StringList tokens); @Override int hashCode(); @Override boolean equals(Object obj); @Override String toString();  }