Package org.dnsge.powerschoolapi.detail
Class GradeGroup
- java.lang.Object
-
- org.dnsge.powerschoolapi.detail.GradeGroup
-
public class GradeGroup extends java.lang.Object
Class that represents a group of grades- Version:
- 1.0.3
-
-
Constructor Summary
Constructors Constructor Description GradeGroup(DocumentFetcher documentFetcher, java.lang.String letterGrade, float numberGrade, ColumnMode gradingPeriod, java.lang.String hrefAttrib)
General constructorGradeGroup(DocumentFetcher documentFetcher, ColumnMode gradingPeriod)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static GradeGroup
emptyGrade(Course myCourse, ColumnMode gradingPeriod)
Creates a new GradeGroup that is 'empty' and 'unused'boolean
equals(java.lang.Object o)
GradingPeriod
getGradingPeriod()
java.lang.String
getGradingPeriodName()
java.lang.String
getHrefAttrib()
java.lang.String
getLetterGrade()
float
getNumberGrade()
int
hashCode()
boolean
isEmpty()
boolean
isUnused()
static GradeGroup
noGrade(Course myCourse, ColumnMode gradingPeriod)
Creates a new GradeGroup that is 'empty'void
setEmpty(boolean empty)
void
setUnused(boolean unused)
java.lang.String
toString()
-
-
-
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 assignmentsletterGrade
- Grade as a letter for GradeGroupnumberGrade
- Grade as a number for GradeGroupgradingPeriod
- 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
-
GradeGroup
public GradeGroup(DocumentFetcher documentFetcher, ColumnMode gradingPeriod)
-
-
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 togradingPeriod
- 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 togradingPeriod
- 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 classjava.lang.Object
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
isEmpty
public boolean isEmpty()
- Returns:
- Whether this
GradeGroup
has no grades
-
setEmpty
public void setEmpty(boolean empty)
- Parameters:
empty
- Whether thisGradeGroup
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 thisGradeGroup
- 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()
-
-