Class DetailAstSet

    • Constructor Detail

      • DetailAstSet

        public DetailAstSet​(IndentationCheck indentCheck)
        Construct an instance of this class with IndentationCheck parameters.
        Parameters:
        indentCheck - IndentationCheck parameters
    • Method Detail

      • addAst

        public void addAst​(DetailAST ast)
        Add ast to the set of ast.
        Parameters:
        ast - the ast to add
      • addLineWithAst

        private void addLineWithAst​(int lineNo,
                                    DetailAST ast)
        Map ast with their line number.
        Parameters:
        lineNo - line number of ast to add
        ast - ast to add
      • getStartColumn

        public Integer getStartColumn​(int lineNum)
        Get starting column number for the ast.
        Parameters:
        lineNum - the line number as key
        Returns:
        start column for ast
      • isEmpty

        public boolean isEmpty()
        Check if this set of ast is empty.
        Returns:
        true if empty, false otherwise
      • firstLine

        public DetailAST firstLine()
        The first line in set of ast.
        Returns:
        first line in set of ast.
      • getAst

        public DetailAST getAst​(int lineNum)
        Get the ast corresponding to line number.
        Parameters:
        lineNum - line number of ast.
        Returns:
        ast with their corresponding line number or null if no mapping is present
      • lastLine

        public Integer lastLine()
        Get the line number of the last line.
        Returns:
        the line number of the last line
      • expandedTabsColumnNo

        protected final int expandedTabsColumnNo​(DetailAST ast)
        Get the column number for the start of a given expression, expanding tabs out into spaces in the process.
        Parameters:
        ast - the expression to find the start of
        Returns:
        the column number for the start of the expression