Class GradeGroup


  • public class GradeGroup
    extends java.lang.Object
    Class that represents a group of grades
    Version:
    1.0.3
    • Constructor Detail

      • GradeGroup

        public GradeGroup​(DocumentFetcher documentFetcher,
                          java.lang.String letterGrade,
                          float numberGrade,
                          ColumnMode gradingPeriod,
                          java.lang.String hrefAttrib)
        General constructor
        Parameters:
        documentFetcher - DocumentFetcher to use for getting detailed assignments
        letterGrade - Grade as a letter for GradeGroup
        numberGrade - Grade as a number for GradeGroup
        gradingPeriod - Period of Grading (Whole year, quarter 1, ect)
        hrefAttrib - Partial URL that contains a link to the page for the assignments within this specific GradeGroup
    • Method Detail

      • noGrade

        public static GradeGroup noGrade​(Course myCourse,
                                         ColumnMode gradingPeriod)
        Creates a new GradeGroup that is 'empty'
        Parameters:
        myCourse - Course that the GradeGroup belongs to
        gradingPeriod - Period of Grading (Whole year, quarter 1, ect)
        Returns:
        new GradeGroup object with the desired attributes
      • emptyGrade

        public static GradeGroup emptyGrade​(Course myCourse,
                                            ColumnMode gradingPeriod)
        Creates a new GradeGroup that is 'empty' and 'unused'
        Parameters:
        myCourse - Course that the GradeGroup belongs to
        gradingPeriod - Period of Grading (Whole year, quarter 1, ect)
        Returns:
        new GradeGroup object with the desired attributes
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • isEmpty

        public boolean isEmpty()
        Returns:
        Whether this GradeGroup has no grades
      • setEmpty

        public void setEmpty​(boolean empty)
        Parameters:
        empty - Whether this GradeGroup has no grades
      • setUnused

        public void setUnused​(boolean unused)
      • getLetterGrade

        public java.lang.String getLetterGrade()
        Returns:
        GradeGroup letter grade
      • getNumberGrade

        public float getNumberGrade()
        Returns:
        GradeGroup grade as a decimal out of 100
      • getGradingPeriod

        public GradingPeriod getGradingPeriod()
        Returns:
        The GradingPeriod of this GradeGroup
        See Also:
        GradingPeriod
      • getGradingPeriodName

        public java.lang.String getGradingPeriodName()
        Returns:
        The name of the grading period of this GradeGroup
      • getHrefAttrib

        public java.lang.String getHrefAttrib()
        Returns:
        The href attribute of the Element used to make this GradeGroup
      • isUnused

        public boolean isUnused()