Package com.tibco.patterns.learn.api.feature

## Class GenderFeature

- java.lang.Object
- - com.tibco.patterns.learn.api.feature.Feature<com.tibco.patterns.learn.jaxb.model.GenderFeatureType>
  - - com.tibco.patterns.learn.api.feature.GenderFeature

-     public final class GenderFeature
      extends Feature<com.tibco.patterns.learn.jaxb.model.GenderFeatureType>

  A feature with 2 predicate querylets that mean: both records are male; both records are female. Contains no setters because predicate expressions have to be recreated if anything changes. Recreate GenderFeature when settings change.

- - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `GenderFeature​(java.lang.String name, int genderFieldIndex, java.util.List<java.lang.String> maleCodes, java.util.List<java.lang.String> femaleCodes, java.util.List<java.lang.String> allFields)` | Creates a new feature for the given gender field

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `java.util.List<java.lang.String>` | `getFemaleCodes()` |
    `java.lang.String` | `getFieldName()` |
    `java.util.List<java.lang.String>` | `getFieldNames()` |
    `java.util.List<java.lang.String>` | `getMaleCodes()` |

    - ### Methods inherited from class com.tibco.patterns.learn.api.feature.Feature

      `getName, getNetricsQlts, getNQlts, getQlt, getQltNames, getQlts, setName, toString`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### GenderFeature

          public GenderFeature​(java.lang.String name,
                               int genderFieldIndex,
                               java.util.List<java.lang.String> maleCodes,
                               java.util.List<java.lang.String> femaleCodes,
                               java.util.List<java.lang.String> allFields)

      Creates a new feature for the given gender field
      Parameters:
        `name` - - the name of the feature. Not null.
        `genderFieldIndex` - - index of the gender field in allFields
        `maleCodes` - - all field values that represent male. Not null.
        `femaleCodes` - - all field values that represent female. Not null.
        `allFields` - - names of all fields in data table
      Throws:
        `java.lang.IllegalArgumentException` - if no male or female codes are provided, or same code is used for male and female, or if no fields are specified in allFields.

  - ### Method Detail

    - #### getMaleCodes

          public java.util.List<java.lang.String> getMaleCodes()

      Returns:
        all field values that represent male

    - #### getFemaleCodes

          public java.util.List<java.lang.String> getFemaleCodes()

      Returns:
        all field values that represent female

    - #### getFieldName

          public java.lang.String getFieldName()

      Returns:
        the gender field name

    - #### getFieldNames

          public java.util.List<java.lang.String> getFieldNames()

      Overrides:
        `getFieldNames` in class `Feature<com.tibco.patterns.learn.jaxb.model.GenderFeatureType>`
      Returns:
        a list that contains the single gender field name