Skip to content

Commit

Permalink
Minor javadoc improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
cowtowncoder committed Jan 10, 2023
1 parent a0bb486 commit d5cdd7b
Showing 1 changed file with 13 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@

/**
* Simple {@link FilterProvider} implementation that just stores
* direct id-to-filter mapping.
* direct id-to-filter mapping. It also allows specifying a
* "default" filter to return if no registered instance matches
* given filter id.
*<p>
* Note that version 2.3 was a partial rewrite, now that
* {@link PropertyFilter} is set to replace <code>BeanPropertyFilter</code>.
Expand All @@ -25,7 +27,7 @@ public class SimpleFilterProvider

/**
* This is the filter we return in case no mapping was found for
* given id; default is 'null' (in which case caller typically
* given id; default is {@code null} (in which case caller typically
* reports an error), but can be set to an explicit filter.
*/
protected PropertyFilter _defaultFilter;
Expand Down Expand Up @@ -104,6 +106,14 @@ public SimpleFilterProvider setDefaultFilter(BeanPropertyFilter f)
return this;
}

/**
* Method for defining "default filter" to use, if any ({@code null} if none),
* to return in case no registered instance matches passed filter id.
*
* @param f Default filter to set
*
* @return This provider instance, for call-chaining
*/
public SimpleFilterProvider setDefaultFilter(PropertyFilter f)
{
_defaultFilter = f;
Expand Down Expand Up @@ -170,7 +180,7 @@ public BeanPropertyFilter findFilter(Object filterId)
{
throw new UnsupportedOperationException("Access to deprecated filters not supported");
}

@Override
public PropertyFilter findPropertyFilter(Object filterId, Object valueToFilter)
{
Expand Down

0 comments on commit d5cdd7b

Please sign in to comment.