@Test public void caseInsensitive() { ArrayPairList list = new ArrayPairList(ArrayPairList.caseInsensitiveMatcher(), "Foo", "bar", "baz", "gaw"); assertEquals("case-insensitive retrieval", "bar", list.getFirstValue("foo")); }
public static <T> NameValuePairList<T> caseInsensitive(Iterable<T> pairs, Function<? super T, String> nameGetter, Function<? super T, String> valueGetter) { return new NameValuePairList<>(pairs, nameGetter, valueGetter, CASE_INSENSITIVE_MATCHER); }
NameValuePairList { public static <T> NameValuePairList<T> caseInsensitive(Iterable<T> pairs, Function<? super T, String> nameGetter, Function<? super T, String> valueGetter) { return new NameValuePairList<>(pairs, nameGetter, valueGetter, CASE_INSENSITIVE_MATCHER); } }
NameValuePairList { public static <T> NameValuePairList<T> caseInsensitive(Iterable<T> pairs, Function<? super T, String> nameGetter, Function<? super T, String> valueGetter) { return new NameValuePairList<>(pairs, nameGetter, valueGetter, CASE_INSENSITIVE_MATCHER); } NameValuePairList(Iterable<? extends T> pairs, Function<? super T, String> nameGetter, Function<? super T, String> valueGetter, BiPredicate<? super String, ? super String> nameMatcher); }
NameValuePairList { public static <T> NameValuePairList<T> caseInsensitive(Iterable<T> pairs, Function<? super T, String> nameGetter, Function<? super T, String> valueGetter) { return new NameValuePairList<>(pairs, nameGetter, valueGetter, CASE_INSENSITIVE_MATCHER); } NameValuePairList(Iterable<? extends T> pairs, Function<? super T, String> nameGetter, Function<? super T, String> valueGetter, BiPredicate<? super String, ? super String> nameMatcher); static NameValuePairList<T> empty(); @Nullable String getFirstValue(String name); Stream<String> streamValues(String name); ImmutableList<String> listValues(String name); static NameValuePairList<T> caseSensitive(Iterable<T> pairs, Function<? super T, String> nameGetter, Function<? super T, String> valueGetter); static NameValuePairList<T> caseInsensitive(Iterable<T> pairs, Function<? super T, String> nameGetter, Function<? super T, String> valueGetter); }
NameValuePairList { public static <T> NameValuePairList<T> caseInsensitive(Iterable<T> pairs, Function<? super T, String> nameGetter, Function<? super T, String> valueGetter) { return new NameValuePairList<>(pairs, nameGetter, valueGetter, CASE_INSENSITIVE_MATCHER); } NameValuePairList(Iterable<? extends T> pairs, Function<? super T, String> nameGetter, Function<? super T, String> valueGetter, BiPredicate<? super String, ? super String> nameMatcher); static NameValuePairList<T> empty(); @Nullable String getFirstValue(String name); Stream<String> streamValues(String name); ImmutableList<String> listValues(String name); static NameValuePairList<T> caseSensitive(Iterable<T> pairs, Function<? super T, String> nameGetter, Function<? super T, String> valueGetter); static NameValuePairList<T> caseInsensitive(Iterable<T> pairs, Function<? super T, String> nameGetter, Function<? super T, String> valueGetter);  }