@Test public void testNullSearch() throws Exception { search = new ExactMatcherSearch<>( new ExactMatcher(KeyDefinition.newKeyDefinition().withId("value" ).build(), null ), map ); MultiMap<Value, Object, List<Object>> search1 = search.search(); assertEquals( "I am null", search1.get( new Value( null ) ).get( 0 ) ); }
public MultiMap<Value, T, List<T>> search() { if (matcher.isNegate()) { if (map.containsKey(matcher.getValue())) { return MultiMap.merge(map.subMap(map.firstKey(), true, matcher.getValue(), false), map.subMap(matcher.getValue(), false, map.lastKey(), true)); } else { return map; } } else { return map.subMap(matcher.getValue(), true, matcher.getValue(), true); } }
ExactMatcherSearch { public MultiMap<Value, T, List<T>> search() { if (matcher.isNegate()) { if (map.containsKey(matcher.getValue())) { return MultiMap.merge(map.subMap(map.firstKey(), true, matcher.getValue(), false), map.subMap(matcher.getValue(), false, map.lastKey(), true)); } else { return map; } } else { return map.subMap(matcher.getValue(), true, matcher.getValue(), true); } } }
ExactMatcherSearch { public MultiMap<Value, T, List<T>> search() { if (matcher.isNegate()) { if (map.containsKey(matcher.getValue())) { return MultiMap.merge(map.subMap(map.firstKey(), true, matcher.getValue(), false), map.subMap(matcher.getValue(), false, map.lastKey(), true)); } else { return map; } } else { return map.subMap(matcher.getValue(), true, matcher.getValue(), true); } } ExactMatcherSearch(final ExactMatcher matcher,
                              final MultiMap<Value, T, List<T>> map); }
ExactMatcherSearch { public MultiMap<Value, T, List<T>> search() { if (matcher.isNegate()) { if (map.containsKey(matcher.getValue())) { return MultiMap.merge(map.subMap(map.firstKey(), true, matcher.getValue(), false), map.subMap(matcher.getValue(), false, map.lastKey(), true)); } else { return map; } } else { return map.subMap(matcher.getValue(), true, matcher.getValue(), true); } } ExactMatcherSearch(final ExactMatcher matcher,
                              final MultiMap<Value, T, List<T>> map); MultiMap<Value, T, List<T>> search(); }
ExactMatcherSearch { public MultiMap<Value, T, List<T>> search() { if (matcher.isNegate()) { if (map.containsKey(matcher.getValue())) { return MultiMap.merge(map.subMap(map.firstKey(), true, matcher.getValue(), false), map.subMap(matcher.getValue(), false, map.lastKey(), true)); } else { return map; } } else { return map.subMap(matcher.getValue(), true, matcher.getValue(), true); } } ExactMatcherSearch(final ExactMatcher matcher,
                              final MultiMap<Value, T, List<T>> map); MultiMap<Value, T, List<T>> search();  }