Class From

    • Constructor Detail

      • From

        public From()
        Constructs a default instance of this class.
      • From

        public From​(List<? extends FromClause> parameters)
        Constructs an instance of this class from an ordered set of from clauses
        Parameters:
        parameters - The ordered list of from clauses
    • Method Detail

      • addClause

        public void addClause​(FromClause clause)
        Add a clause to the FROM
        Parameters:
        clause - Add a clause to the FROM
      • addClauses

        public void addClauses​(Collection<? extends FromClause> toAdd)
        Add clauses to the FROM
        Parameters:
        toAdd - Collection of FromClauses
      • setClauses

        public void setClauses​(List<FromClause> clauses)
        Set all the clauses
        Parameters:
        clauses - List of FromClause
      • addGroup

        public void addGroup​(GroupSymbol group)
        Adds a new group to the list (it will be wrapped in a UnaryFromClause)
        Parameters:
        group - Group to add
      • addGroups

        public void addGroups​(Collection<GroupSymbol> groups)
        Adds a new collection of groups to the list
        Parameters:
        groups - Collection of GroupSymbol
      • getGroups

        public List<GroupSymbol> getGroups()
        Returns an ordered list of the groups in all sub-clauses.
        Returns:
        List of GroupSymbol
      • containsGroup

        public boolean containsGroup​(GroupSymbol group)
        Checks if a group is in the From
        Parameters:
        group - Group to check for
        Returns:
        True if the From contains the group
      • acceptVisitor

        public void acceptVisitor​(LanguageVisitor visitor)
        Description copied from interface: LanguageObject
        Method for accepting a visitor. It is the responsibility of the language object to call back on the visitor.
        Specified by:
        acceptVisitor in interface LanguageObject
        Parameters:
        visitor - Visitor being used
      • clone

        public Object clone()
        Return copy of this From clause.
        Specified by:
        clone in interface LanguageObject
        Overrides:
        clone in class Object
        Returns:
        Deep clone of this object
      • equals

        public boolean equals​(Object obj)
        Compare two Froms for equality. Order is not important in the from, so this is a set comparison.
        Overrides:
        equals in class Object
      • hashCode

        public int hashCode()
        Get hashcode for From. WARNING: The hash code relies on the variables in the select, so changing the variables will change the hash code, causing a select to be lost in a hash structure. Do not hash a From if you plan to change it.
        Overrides:
        hashCode in class Object
      • toString

        public String toString()
        Returns a string representation of an instance of this class.
        Overrides:
        toString in class Object
        Returns:
        String representation of object