Class FlagInstanceFilter

java.lang.Object
dev.metaschema.schemagen.FlagInstanceFilter

public final class FlagInstanceFilter extends Object
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 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 filter
      jsonKeyFlag - the flag instance used as a JSON key to exclude, or null if 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 filter
      jsonKeyFlag - the flag instance used as a JSON key to exclude, or null if no JSON key filtering is needed
      jsonValueKeyFlag - the flag instance used as a JSON value key to exclude, or null if no JSON value key filtering is needed
      Returns:
      a collection containing all flags except the excluded ones