Skip to content

Commit

Permalink
Merge pull request #691 from mP1/feature/ExpressionFunction-filterPar…
Browse files Browse the repository at this point in the history
…ameterValues-was-filterParameters

ExpressionFunction.filterParameterValues was filterParameters
  • Loading branch information
mP1 authored Dec 6, 2023
2 parents becad78 + 544d7ac commit 2f97235
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ default ExpressionFunction<T, C> mapParameterValues(final BiFunction<List<Object
/**
* Returns a new {@link ExpressionFunction} that filters parameters using the given {@link BiPredicate}.
*/
default ExpressionFunction<T, C> filterParameters(final BiPredicate<Object, C> filter) {
default ExpressionFunction<T, C> filterParameterValues(final BiPredicate<Object, C> filter) {
return ExpressionFunctionParameterValuesFilter.with(filter, this);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public T apply(final List<Object> parameters,
* Special cases that handles if the new filter is equal to the current.
*/
@Override
public ExpressionFunction<T, C> filterParameters(final BiPredicate<Object, C> filter) {
public ExpressionFunction<T, C> filterParameterValues(final BiPredicate<Object, C> filter) {
checkFilter(filter);

return this.filter.equals(filter) ?
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,10 +107,10 @@ public void testName() {
}

@Test
public void testMapFilterSamePredicate() {
public void testFilterParameterValuesSamePredicate() {
final ExpressionFunctionParameterValuesFilter<Object, ExpressionEvaluationContext> function = this.createBiFunction();

assertSame(function, function.filterParameters(FILTER));
assertSame(function, function.filterParameterValues(FILTER));
}

@Test
Expand Down

0 comments on commit 2f97235

Please sign in to comment.