Package org.cyclos.model.utils
Class FieldSelector
- java.lang.Object
-
- org.cyclos.model.utils.FieldSelector
-
- All Implemented Interfaces:
Serializable
public class FieldSelector extends Object implements Serializable
Abstraction for selecting which fields are included in a result- See Also:
- Serialized Form
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidapply(Object object)Applies the field selection to the given object, setting to null all values that should be excludedstatic FieldSelectorempty()booleanincludes(String name)Returns whether the given path name should be included in the fieldsstatic FieldSelectorof(String... fields)static FieldSelectorof(Collection<String> fields)StringtoString()
-
-
-
Method Detail
-
empty
public static FieldSelector empty()
-
of
public static final FieldSelector of(Collection<String> fields)
-
of
public static final FieldSelector of(String... fields)
-
apply
public void apply(Object object)
Applies the field selection to the given object, setting to null all values that should be excluded
-
includes
public boolean includes(String name)
Returns whether the given path name should be included in the fields
-
-