com.ibm.openpages.api.resource

## Interface IEnumAnswersField

- All Superinterfaces:
    IField

      public interface IEnumAnswersField
      extends IField

  Represents a field to list enumerated answers.

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `appendEnumAnswer(java.lang.String name, int value, boolean isHidden, java.lang.String description, java.lang.Integer score, java.util.List<java.lang.String> requires)` Adds new enum answer to the end of the enumerated answers list.
    `void` | `clearEnumAnswers()` Removes all the enum answer entries.
    `java.util.List<IEnumAnswer>` | `getEnumAnswers()` Returns the ordered values of an enumerated answers field.
    `void` | `insertEnumAnswer(int index, java.lang.String name, int value, boolean isHidden, java.lang.String description, java.lang.Integer score, java.util.List<java.lang.String> requires)` Adds new enum answer to this enumerated answers list at the specified index.
    `IEnumAnswer` | `removeEnumAnswerById(Id id)` Removes an enum answer entry by Id.
    `IEnumAnswer` | `removeEnumAnswerByName(java.lang.String name)` Removes an enum answer entry by name.

    - ### Methods inherited from interface com.ibm.openpages.api.resource.IField

      `canRead, canWrite, getCalcLogs, getDataType, getFieldDefinition, getId, getName, hasCalcInQueue, hasChanged, isEncrypted, isNull`

- - ### Method Detail

    - #### getEnumAnswers

          java.util.List<IEnumAnswer> getEnumAnswers()

      Returns the ordered values of an enumerated answers field.
      Returns:
        the field value as a list of elements of an enumeration

    - #### appendEnumAnswer

          void appendEnumAnswer(java.lang.String name,
                                int value,
                                boolean isHidden,
                                java.lang.String description,
                                java.lang.Integer score,
                                java.util.List<java.lang.String> requires)

      Adds new enum answer to the end of the enumerated answers list.
      Parameters:
        `name` - the name of the enumerated answer
        `value` - the integer value of the enumerated answer
        `isHidden` - true to hide this value, otherwise set answer
        `description` - the description of the enumerated answer
        `score` - the score of the enumerated answer
        `requires` - the list of required evidence type for this answer

    - #### insertEnumAnswer

          void insertEnumAnswer(int index,
                                java.lang.String name,
                                int value,
                                boolean isHidden,
                                java.lang.String description,
                                java.lang.Integer score,
                                java.util.List<java.lang.String> requires)

      Adds new enum answer to this enumerated answers list at the specified index.
      Parameters:
        `index` - the index at which the specified value is to be inserted
        `name` - the name of the enumerated answer
        `value` - the integer value of the enumerated answer
        `isHidden` - true to hide this value, otherwise set answer
        `description` - the description of the enumerated answer
        `score` - the score of the enumerated answer
        `requires` - the list of required evidence type for this answer

    - #### removeEnumAnswerById

          IEnumAnswer removeEnumAnswerById(Id id)

      Removes an enum answer entry by Id.
      Parameters:
        `id` - to remove an entry
      Returns:
        the removed enum answer, or null if the id does not match

    - #### removeEnumAnswerByName

          IEnumAnswer removeEnumAnswerByName(java.lang.String name)

      Removes an enum answer entry by name.
      Parameters:
        `name` - to remove an entry
      Returns:
        the removed enum answer, or null if the name does not match

    - #### clearEnumAnswers

          void clearEnumAnswers()

      Removes all the enum answer entries.

Licensed Materials - Property of IBM
OpenPages with Watson (PID: 5725-D51)
© Copyright IBM Corporation 2013, 2020. All Rights Reserved.
US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.