Class StandardizerConfiguration

    • Constructor Detail

      • StandardizerConfiguration

        public StandardizerConfiguration()
    • Method Detail

      • addAction

        public void addAction​(StandardizerAction action)
        Adds an action to the configuration
        Parameters:
        action - the action to be added to the configuration
      • addActions

        public void addActions​(List<StandardizerAction> actions)
        Adds actions to the configuration
        Parameters:
        actions - the actions to be added to the configuration
      • removeAction

        public void removeAction​(StandardizerAction action)
        Removes an action of the configuration
        Parameters:
        action - the action to be removed to the configuration
      • removeActions

        public void removeActions​(Collection<StandardizerAction> actions)
        Removes actions of the configuration
        Parameters:
        actions - the actions to be removed to the configuration
      • getActions

        public List<StandardizerAction> getActions()
        Gets all actions of the configuration
        Returns:
        all actions of the configuration
      • getActions

        public List<StandardizerAction> getActions​(String group)
        Gets actions of a group of the configuration
        Parameters:
        group - the name of the group (case sensitive)
        Returns:
        actions of a group of the configuration
      • getActions

        public List<StandardizerAction> getActions​(String... groups)
        Gets actions of a group of the configuration
        Parameters:
        groups - the name of the group (case sensitive)
        Returns:
        actions of a group of the configuration
      • addActionToGroup

        public void addActionToGroup​(String group,
                                     StandardizerAction action)
        Adds an action to the group
        Parameters:
        group - the name of the group
        action - the standardizer action
      • addActionToGroups

        public void addActionToGroups​(Collection<String> groups,
                                      StandardizerAction action)
        Adds an action to a list of groups
        Parameters:
        groups - the list of the group names
        action - the standardizer action
      • cloneConfiguration

        public StandardizerConfiguration cloneConfiguration()
        Clones the configuration
        Returns:
        the clone of the configuration
      • isEmpty

        public boolean isEmpty()
        Gets whether the configuration contains actions
        Returns:
        true is the configuration does not contains actions
      • clear

        public void clear()
        Clears the configuration of action
      • getActionCount

        public int getActionCount()
        Gets the action count of the configuration
        Returns:
        the action count of the configuration
      • getLastIndexOfAction

        public int getLastIndexOfAction​(String token)
        Gets the last index of an action defined by the provided action string
        Parameters:
        token - the action string token of the action
        Returns:
        the last index of an action defined by the provided action string
      • getActionIndexes

        public List<Integer> getActionIndexes​(String actionString)
        Gets the indexes of actions defined by the provided action string
        Parameters:
        actionString - the action string token of the task
        Returns:
        indexes of actions defined by the provided action string
      • getGroupsOf

        public String getGroupsOf​(StandardizerAction action)
        Gets the group names associated to an action separated by , character
        Parameters:
        action - the target action
        Returns:
        the groups associated to the action
      • isValid

        public boolean isValid()
        Gets whether the configuration contains only valid elements
        Returns:
        true if the configuration contains only valid elements
      • createErrorMessage

        public static String createErrorMessage​(StandardizerConfiguration configuration)
        Creates an error message based on an invalid configuration
        Parameters:
        configuration - the base configuration
        Returns:
        the proper error message for the configuration