parent
f5fff1e0f4
commit
7057cd3394
@ -0,0 +1,8 @@
|
||||
package io.zhile.research.ja.netfilter.rulers;
|
||||
|
||||
public class EqualICRuler implements Ruler {
|
||||
@Override
|
||||
public boolean test(String rule, String content) {
|
||||
return content.equalsIgnoreCase(rule);
|
||||
}
|
||||
}
|
@ -0,0 +1,8 @@
|
||||
package io.zhile.research.ja.netfilter.rulers;
|
||||
|
||||
public class KeywordICRuler implements Ruler {
|
||||
@Override
|
||||
public boolean test(String rule, String content) {
|
||||
return content.toLowerCase().contains(rule.toLowerCase());
|
||||
}
|
||||
}
|
@ -0,0 +1,8 @@
|
||||
package io.zhile.research.ja.netfilter.rulers;
|
||||
|
||||
public class PrefixICRuler implements Ruler {
|
||||
@Override
|
||||
public boolean test(String rule, String content) {
|
||||
return content.toLowerCase().startsWith(rule.toLowerCase());
|
||||
}
|
||||
}
|
@ -0,0 +1,8 @@
|
||||
package io.zhile.research.ja.netfilter.rulers;
|
||||
|
||||
public class SuffixICRuler implements Ruler {
|
||||
@Override
|
||||
public boolean test(String rule, String content) {
|
||||
return content.toLowerCase().endsWith(rule.toLowerCase());
|
||||
}
|
||||
}
|
Loading…
Reference in new issue