Enum Class Grade

java.lang.Object
java.lang.Enum<Grade>
de.hsh.graja.core.result.Grade
All Implemented Interfaces:
Serializable, Comparable<Grade>, Constable

public enum Grade extends Enum<Grade>
Grading aspects get a grade by a module runner. This enum represents the different grades that can be awarded.
  • Nested Class Summary

    Nested classes/interfaces inherited from class java.lang.Enum

    Enum.EnumDesc<E extends Enum<E>>
  • Enum Constant Summary

    Enum Constants
    Enum Constant
    Description
    An aspect is CORRECT, if there are no errors in it.
    An aspect is DELAYED, if the module runner cannot award a final grade to the aspect, because that depends on manual or other processes that have take place after the module runner finishes.
    An aspect is MISSING, if a module runner did not grade an aspect at all.
    An aspect is a SUBSEQUENT_ERROR, if a successful grading depends on other aspects to be correct.
    An aspect has a TIMEOUT, if the module runner runs out of time when grading the aspect.
    An aspect is WRONG, if the submission does not fully adhere to the requirements.
  • Method Summary

    Modifier and Type
    Method
    Description
    static String
     
     
    boolean
     
    static boolean
    A collection of several aspects is CORRECT only, if all contained aspects are CORRECT.
    boolean
    A grade is faulty, if it is either WRONG or TIMEOUT or SEUBSEQUENT_ERROR or MISSING.
    static boolean
    A collection of several aspects is faulty, if it contains at least one aspect that is either WRONG or TIMEOUT or SEUBSEQUENT_ERROR or MISSING.
    static Grade
    Returns the enum constant of this class with the specified name.
    static Grade[]
    Returns an array containing the constants of this enum class, in the order they are declared.

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, wait, wait, wait
  • Enum Constant Details

    • CORRECT

      public static final Grade CORRECT
      An aspect is CORRECT, if there are no errors in it. A correct solution usually gets full score from an evaluator.
    • WRONG

      public static final Grade WRONG
      An aspect is WRONG, if the submission does not fully adhere to the requirements. Contrast WRONG with the other non-correct grades. WRONG aspects are incorrect by themselves. If an aspect was not graded as correct because there was a timeout, a delay or a dependency from other aspects, use one of the other faulty grades such as TIMEOUT, DELAYED, or SUBSEQUENT_ERROR.
    • SUBSEQUENT_ERROR

      public static final Grade SUBSEQUENT_ERROR
      An aspect is a SUBSEQUENT_ERROR, if a successful grading depends on other aspects to be correct.
    • TIMEOUT

      public static final Grade TIMEOUT
      An aspect has a TIMEOUT, if the module runner runs out of time when grading the aspect.
    • DELAYED

      public static final Grade DELAYED
      An aspect is DELAYED, if the module runner cannot award a final grade to the aspect, because that depends on manual or other processes that have take place after the module runner finishes.
    • MISSING

      public static final Grade MISSING
      An aspect is MISSING, if a module runner did not grade an aspect at all. The reasons is highly module runner dependent. Maybe it is a programming error in the module.
  • Method Details

    • values

      public static Grade[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static Grade valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • getDisplayName

      public String getDisplayName()
    • isCorrect

      public static boolean isCorrect(Iterable<Grade> grades)
      A collection of several aspects is CORRECT only, if all contained aspects are CORRECT. An empty set of grades is correct by definition.
      Parameters:
      grades - a collection of Grades
      Returns:
      true, if the given collection is CORRECT
    • isFaulty

      public static boolean isFaulty(Iterable<Grade> grades)
      A collection of several aspects is faulty, if it contains at least one aspect that is either WRONG or TIMEOUT or SEUBSEQUENT_ERROR or MISSING. An empty set of grades is not faulty by definition.
      Parameters:
      grades - a collection of Grades
      Returns:
      true, if the given collection is faulty
    • getDisplayname

      public static String getDisplayname(Iterable<Grade> grades)
    • isFaulty

      public boolean isFaulty()
      A grade is faulty, if it is either WRONG or TIMEOUT or SEUBSEQUENT_ERROR or MISSING.
      Returns:
      true, if this is faulty
    • isCorrect

      public boolean isCorrect()
      Returns:
      true, if this grade equals CORRECT.