Package io.protostuff.runtime
Class Predicate.RANGE
- java.lang.Object
-
- io.protostuff.runtime.Predicate.RANGE
-
- All Implemented Interfaces:
Predicate
,Predicate.Factory
- Enclosing interface:
- Predicate
public static final class Predicate.RANGE extends java.lang.Object implements Predicate, Predicate.Factory
A predicate that includes fields if they are within range of the provided numbers, min and max.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface io.protostuff.runtime.Predicate
Predicate.EQ, Predicate.Factories, Predicate.Factory, Predicate.GT, Predicate.LT, Predicate.NOTEQ, Predicate.NOTRANGE, Predicate.RANGE
-
-
Constructor Summary
Constructors Constructor Description RANGE(int min, int max)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
apply(Field<?> f)
Returns true if the field is included.boolean
apply(Field<?> f, java.lang.Object message)
Returns true if the field is included.Predicate
create(java.lang.String[] args)
Creates a new predicate based from the args.
-
-
-
Method Detail
-
apply
public boolean apply(Field<?> f)
Description copied from interface:Predicate
Returns true if the field is included.
-
apply
public boolean apply(Field<?> f, java.lang.Object message)
Description copied from interface:Predicate
Returns true if the field is included.The predicate logic can be dynamic based on the contents of the message.
-
create
public Predicate create(java.lang.String[] args)
Description copied from interface:Predicate.Factory
Creates a new predicate based from the args.- Specified by:
create
in interfacePredicate.Factory
-
-