@Test public void prefixList() { PrefixList prefixList = new PrefixList(ImmutableList.of("test", "apple", "sun")); assertTrue(prefixList.inList("test")); assertTrue(prefixList.inList("apple")); assertTrue(prefixList.inList("sun")); assertTrue(prefixList.inList("test123")); assertTrue(prefixList.inList("testing-1012")); assertTrue(prefixList.inList("apple12nmzx91l")); assertTrue(prefixList.inList("sunn1i2080-40mx")); assertFalse(prefixList.outList("test123")); assertFalse(prefixList.outList("testing-1012")); assertFalse(prefixList.outList("apple12nmzx91l")); assertFalse(prefixList.outList("sunn1i2080-40mx")); assertTrue(prefixList.outList("tes")); assertTrue(prefixList.outList("a")); assertTrue(prefixList.outList("s")); assertTrue(prefixList.outList("su")); assertTrue(prefixList.outList("ap")); assertTrue(prefixList.outList("")); assertTrue(prefixList.outList(null)); }
public PrefixList(List<String> prefixList) { if (prefixList == null) { mInnerList = ImmutableList.of(); } else { mInnerList = ImmutableList.copyOf(prefixList); } }
PrefixList { public PrefixList(List<String> prefixList) { if (prefixList == null) { mInnerList = ImmutableList.of(); } else { mInnerList = ImmutableList.copyOf(prefixList); } } }
PrefixList { public PrefixList(List<String> prefixList) { if (prefixList == null) { mInnerList = ImmutableList.of(); } else { mInnerList = ImmutableList.copyOf(prefixList); } } PrefixList(List<String> prefixList);  PrefixList(String prefixes, String separator); }
PrefixList { public PrefixList(List<String> prefixList) { if (prefixList == null) { mInnerList = ImmutableList.of(); } else { mInnerList = ImmutableList.copyOf(prefixList); } } PrefixList(List<String> prefixList);  PrefixList(String prefixes, String separator); ImmutableList<String> getList(); boolean inList(String path); boolean outList(String path); @Override String toString(); }
PrefixList { public PrefixList(List<String> prefixList) { if (prefixList == null) { mInnerList = ImmutableList.of(); } else { mInnerList = ImmutableList.copyOf(prefixList); } } PrefixList(List<String> prefixList);  PrefixList(String prefixes, String separator); ImmutableList<String> getList(); boolean inList(String path); boolean outList(String path); @Override String toString();  }