@Test public void testRegisterFilterModifierForProperties() throws Exception { TestObjectFilter objectFilter1 = new TestObjectFilter(); objectFilter1.registerFilterModifierForProperties(FilterUtil.FilterModifier.APPEND_TIMEZONEOFFSET, TestObjectFilter.Property.hash); Assert.assertTrue("Modifier not correctly added (objectFilter1).", objectFilter1.filterModifiers.containsKey(TestObjectFilter.Property.hash)); Assert.assertEquals("Modifier not correct (objectFilter1).", FilterUtil.FilterModifier.APPEND_TIMEZONEOFFSET, objectFilter1.filterModifiers.get(TestObjectFilter.Property.hash)); Assert.assertEquals("Incorrect number of modifiers (objectFilter1).", 1, objectFilter1.filterModifiers.size()); TestObjectFilter objectFilter2 = new TestObjectFilter(); objectFilter2.registerFilterModifierForProperties(FilterUtil.FilterModifier.APPEND_TIMEZONEOFFSET, TestObjectFilter.Property.hash, TestObjectFilter.Property.string); Assert.assertEquals("Modifier not correct (objectFilter2, hash).", FilterUtil.FilterModifier.APPEND_TIMEZONEOFFSET, objectFilter2.filterModifiers.get(TestObjectFilter.Property.hash)); Assert.assertEquals("Modifier not correct (objectFilter2, string).", FilterUtil.FilterModifier.APPEND_TIMEZONEOFFSET, objectFilter2.filterModifiers.get(TestObjectFilter.Property.string)); Assert.assertEquals("Incorrect number of modifiers (objectFilter2).", 2, objectFilter2.filterModifiers.size()); }
protected final void registerFilterModifierForProperties(FilterUtil.FilterModifier modifier, PaginationFilterProperty... properties) { Arrays.asList(properties).forEach(p -> filterModifiers.put(p, modifier)); }
PaginationFilter implements Predicate<T> { protected final void registerFilterModifierForProperties(FilterUtil.FilterModifier modifier, PaginationFilterProperty... properties) { Arrays.asList(properties).forEach(p -> filterModifiers.put(p, modifier)); } }
PaginationFilter implements Predicate<T> { protected final void registerFilterModifierForProperties(FilterUtil.FilterModifier modifier, PaginationFilterProperty... properties) { Arrays.asList(properties).forEach(p -> filterModifiers.put(p, modifier)); }  }
PaginationFilter implements Predicate<T> { protected final void registerFilterModifierForProperties(FilterUtil.FilterModifier modifier, PaginationFilterProperty... properties) { Arrays.asList(properties).forEach(p -> filterModifiers.put(p, modifier)); }  PaginationFilter<T> replaceFilter(final String filter, final String timeZoneOffset); final boolean test(T object, Class<V> enumType); }
PaginationFilter implements Predicate<T> { protected final void registerFilterModifierForProperties(FilterUtil.FilterModifier modifier, PaginationFilterProperty... properties) { Arrays.asList(properties).forEach(p -> filterModifiers.put(p, modifier)); }  PaginationFilter<T> replaceFilter(final String filter, final String timeZoneOffset); final boolean test(T object, Class<V> enumType);  }