Enum Class QuestionType

java.lang.Object
java.lang.Enum<QuestionType>
fr.paris.lutece.plugins.wiki.modules.quiz.business.QuestionType
All Implemented Interfaces:
Serializable, Comparable<QuestionType>, Constable

public enum QuestionType extends Enum<QuestionType>
Enumeration of different quiz question types.
  • Enum Constant Details

    • MCQ

      public static final QuestionType MCQ
      Multiple choice question type
    • TRUE_FALSE

      public static final QuestionType TRUE_FALSE
      True or false question type
    • MATCHING

      public static final QuestionType MATCHING
      Matching question type
    • ORDERING

      public static final QuestionType ORDERING
      Ordering question type
  • Method Details

    • values

      public static QuestionType[] 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 QuestionType 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
    • getCode

      public String getCode()
      Gets the code of this question type.
      Returns:
      The question type code
    • fromCode

      public static QuestionType fromCode(String strCode)
      Retrieves a question type from its code.
      Parameters:
      strCode - The question type code
      Returns:
      The matching question type, or MCQ if not found