Class SMFFilterCommandChecks


  • public final class SMFFilterCommandChecks
    extends java.lang.Object
    Useful methods for implementing filter commands.
    • Method Detail

      • checkAttributeExists

        public static java.util.List<SMFProcessingError> checkAttributeExists​(java.util.List<SMFProcessingError> errors,
                                                                              java.util.Map<SMFAttributeName,​SMFAttribute> attributes,
                                                                              SMFAttributeName name)
        Check that the given attribute exists.
        Parameters:
        errors - The current list of errors
        attributes - The available attributes
        name - The attribute name
        Returns:
        The list of errors plus an error indicating that the attribute does not exist
      • checkAttributeNonexistent

        public static java.util.List<SMFProcessingError> checkAttributeNonexistent​(java.util.List<SMFProcessingError> errors,
                                                                                   java.util.Map<SMFAttributeName,​SMFAttribute> attributes,
                                                                                   SMFAttributeName name)
        Check that the given attribute does not exist.
        Parameters:
        errors - The current list of errors
        attributes - The available attributes
        name - The attribute name
        Returns:
        The list of errors plus an error indicating that the attribute already exists