NameAndCountFieldValuesFilter implements FieldValuesFilter, Serializable { @Override public boolean isEmpty() { return (minimalOccurence == null || minimalOccurence == 0) && (name == null || name.isEmpty()) && firstCharacter == null; }  String getName(); void setName(String name); Integer getMinimalOccurence(); void setMinimalOccurence(Integer minimalOccurence); Character getFirstCharacter(); void setFirstCharacter(Character firstCharacter); @Override boolean matches(Count count, IConverter<String> converter); @Override boolean isEmpty(); @Override NameAndCountFieldValuesFilter copy(); static final char ANY_CHARACTER_SYMBOL; static final char NON_ALPHABETICAL_CHARACTER_SYMBOL; }
@Test public void testIsEmpty() { assertTrue(filter.isEmpty()); filter.setName("value"); assertFalse("Name filter", filter.isEmpty()); filter.setName(null); assertTrue(filter.isEmpty()); filter.setMinimalOccurence(10); assertFalse("Count filter", filter.isEmpty()); filter.setMinimalOccurence(null); assertTrue(filter.isEmpty()); filter.setFirstCharacter('c'); assertFalse("Character filter", filter.isEmpty()); filter.setFirstCharacter(null); assertTrue(filter.isEmpty()); }