Skip to content

Commit

Permalink
Fix filters factory
Browse files Browse the repository at this point in the history
  • Loading branch information
bartlomiej.zylinski committed Jun 7, 2024
1 parent 65a60c6 commit e916f8c
Showing 1 changed file with 6 additions and 11 deletions.
17 changes: 6 additions & 11 deletions src/main/java/otter/jet/store/Filters.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,24 +4,19 @@

import java.util.function.Predicate;

// For more parameters consider builder
public record Filters(String subject, String type, String bodyContent) {

public static Filters of(String subject, String type, String bodyContent) {
return new Filters(subject, type, bodyContent);
}

public static Filters of(String subject, String type) {
return new Filters(subject, type, "");
public static Filters empty() {
return new Filters("", "", "");
}


public static Filters of(String subject) {
return new Filters(subject, "" ,"");
return new Filters(subject, "", "");
}


public static Filters empty() {
return new Filters("", "", "");
public static Filters of(String subject, String type, String bodyContent) {
return new Filters(subject, type, bodyContent);
}

Predicate<ReadMessage> toPredicate() {
Expand Down

0 comments on commit e916f8c

Please sign in to comment.