java.lang.Object
dev.metaschema.schemagen.FlagInstanceFilter
A utility class for filtering flag instances during schema generation.
This class provides methods to exclude specific flag instances (such as JSON key flags or JSON value key flags) from collections before processing.
-
Method Summary
Modifier and TypeMethodDescriptionstatic Collection<? extends IFlagInstance>filterFlags(Collection<? extends IFlagInstance> flags, IFlagInstance jsonKeyFlag) Filters flag instances by excluding the specified JSON key flag.static Collection<? extends IFlagInstance>filterFlags(Collection<? extends IFlagInstance> flags, IFlagInstance jsonKeyFlag, IFlagInstance jsonValueKeyFlag) Filters flag instances by excluding both the JSON key flag and JSON value key flag.
-
Method Details
-
filterFlags
@NonNull public static Collection<? extends IFlagInstance> filterFlags(@NonNull Collection<? extends IFlagInstance> flags, IFlagInstance jsonKeyFlag) Filters flag instances by excluding the specified JSON key flag.- Parameters:
flags- the collection of flag instances to filterjsonKeyFlag- the flag instance used as a JSON key to exclude, ornullif no filtering is needed- Returns:
- a collection containing all flags except the JSON key flag
-
filterFlags
@NonNull public static Collection<? extends IFlagInstance> filterFlags(@NonNull Collection<? extends IFlagInstance> flags, IFlagInstance jsonKeyFlag, IFlagInstance jsonValueKeyFlag) Filters flag instances by excluding both the JSON key flag and JSON value key flag.- Parameters:
flags- the collection of flag instances to filterjsonKeyFlag- the flag instance used as a JSON key to exclude, ornullif no JSON key filtering is neededjsonValueKeyFlag- the flag instance used as a JSON value key to exclude, ornullif no JSON value key filtering is needed- Returns:
- a collection containing all flags except the excluded ones
-