Skip to content

Commit 4594a5f

Browse files
committed
Update docs
1 parent 1a2b918 commit 4594a5f

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/site/markdown/docs/extending.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,8 @@ Here's an example of implementing a LIKE condition that supports ESCAPE:
304304

305305
```java
306306
@NullMarked
307-
public class IsLikeEscape<T> extends AbstractSingleValueCondition<T> {
307+
public class IsLikeEscape<T> extends AbstractSingleValueCondition<T>
308+
implements AbstractSingleValueCondition.Filterable<T>, AbstractSingleValueCondition.Mappable<T> {
308309
private static final IsLikeEscape<?> EMPTY = new IsLikeEscape<Object>(-1, null) {
309310
@Override
310311
public Object value() {
@@ -354,6 +355,7 @@ public class IsLikeEscape<T> extends AbstractSingleValueCondition<T> {
354355
return filterSupport(predicate, IsLikeEscape::empty, this);
355356
}
356357

358+
@Override
357359
public <R> IsLikeEscape<R> map(Function<? super T, ? extends R> mapper) {
358360
return mapSupport(mapper, v -> new IsLikeEscape<>(v, escapeCharacter), IsLikeEscape::empty);
359361
}
@@ -374,4 +376,5 @@ Important notes:
374376
2. The class constructor accepts an escape character that will be rendered into an ESCAPE phrase
375377
3. The class overrides `renderCondition` and changes the library generated `FragmentAndParameters` to add the ESCAPE
376378
phrase. **This is the key to what's needed to implement a custom condition.**
377-
4. The class provides `map` and `filter` functions as is expected for any condition in the library
379+
4. The class implements `Filterable` and `Mappable` to provide `filter` and `map` functions as is expected for most
380+
conditions in the library

0 commit comments

Comments
 (0)