org.cpsolver.instructor.model

## Class Attribute.Type

- java.lang.Object
- - org.cpsolver.instructor.model.Attribute.Type

- Enclosing class:
    Attribute

      public static class Attribute.Type
      extends Object

  Attribute type. Each type has an id and a name. It can also define whether attributes of this type are required and/or conjunctive. If an attribute is required, this means that only instructors that have the attribute can be used, even if it is only preferred. This allows to put different preferences on multiple attribute that are required. If a teaching requests require two attributes that are of the same type which is conjunctive, only instructors that have BOTH attributes can be used. It the type is disjunctive (not conjunctive), it is sufficient for the instructor to have one of the two required attributes.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `Type(long typeId, String typeName, boolean conjunctive, boolean required)` Constructor

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `equals(Object o)`
    `Long` | `getTypeId()` Attribute type id that was provided in the constructor
    `String` | `getTypeName()` Attribute type name that was provided in the constructor
    `int` | `hashCode()`
    `boolean` | `isConjunctive()` If a teaching requests require two attributes that are of the same type which is conjunctive, only instructors that have BOTH attributes can be used.
    `boolean` | `isRequired()` If an attribute is required, this means that only instructors that have the attribute can be used, even if it is only preferred.
    `String` | `toString()`

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

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

- - ### Constructor Detail

    - #### Type

          public Type(long typeId,
                      String typeName,
                      boolean conjunctive,
                      boolean required)

      Constructor
      Parameters:
        `typeId` - attribute type id
        `typeName` - attribute type name
        `conjunctive` - is attribute type conjunctive (if two attributes are required a student must have both).
        `required` -

  - ### Method Detail

    - #### getTypeId

          public Long getTypeId()

      Attribute type id that was provided in the constructor
      Returns:
        attribute type id

    - #### getTypeName

          public String getTypeName()

      Attribute type name that was provided in the constructor
      Returns:
        attribute type name

    - #### isRequired

          public boolean isRequired()

      If an attribute is required, this means that only instructors that have the attribute can be used, even if it is only preferred. This allows to put different preferences on multiple attribute that are required.
      Returns:
        true if this attribute type is required

    - #### isConjunctive

          public boolean isConjunctive()

      If a teaching requests require two attributes that are of the same type which is conjunctive, only instructors that have BOTH attributes can be used. It the type is disjunctive (not conjunctive), it is sufficient for the instructor to have one of the two required attributes.
      Returns:
        true if this attribute type is conjunctive, false if disjunctive

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `Object`

    - #### equals

          public boolean equals(Object o)

      Overrides:
        `equals` in class `Object`

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`