Package com.avaya.clientservices.common

## Class Capability

- java.lang.Object
- - com.avaya.clientservices.common.Capability

-     public class Capability
      extends java.lang.Object

  A class representing whether a certain operation can be supported based on the current state of the object upon which the action is taken. For instance, a Capability instance returned from a Conference object may indicate whether the conference call can support muting of a selected participant, based on the participant control capabilities of the conferencing system and the current role of the local user.

- - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `Capability()` | Constructor for being allowed.
    `Capability​(boolean allowed, CapabilityDenialReason reason)` | Constructor
    `Capability​(CapabilityDenialReason reason)` | Constructor for not being allowed.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `boolean` | `equals​(java.lang.Object object)` | Returns whether two objects are equal or not
    `CapabilityDenialReason` | `getDenialReason()` | Returns the reason for not allowing the associated operation.
    `int` | `hashCode()` | Returns hash code associated with the object instance.
    `boolean` | `isAllowed()` |
    `java.lang.String` | `toString()` |

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

      `getClass, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### Capability

          public Capability()

      Constructor for being allowed.

    - #### Capability

          public Capability​(CapabilityDenialReason reason)

      Constructor for not being allowed.
      Parameters:
        `reason` - Reason for why the capability this object is associated with is not available for use.

    - #### Capability

          public Capability​(boolean allowed,
                            CapabilityDenialReason reason)

      Constructor
      Parameters:
        `allowed` - Specify whether allowed or not
        `reason` - Reason for why the capability this object is associated with is not available for use.

  - ### Method Detail

    - #### isAllowed

          public boolean isAllowed()

      Returns:
        Whether the associated operation is allowed

    - #### getDenialReason

          public CapabilityDenialReason getDenialReason()

      Returns the reason for not allowing the associated operation. Calling this method when isAllowed() returns false is not useful. In this case, the method returns CapabilityDenialReason.ALLOWED.
      Returns:
        Reason for not allowing the associated operation.

    - #### equals

          public boolean equals​(java.lang.Object object)

      Returns whether two objects are equal or not
      Overrides:
        `equals` in class `java.lang.Object`
      Parameters:
        `object` - Input object
      Returns:
        true of the objects are equal; false, otherwise.

    - #### hashCode

          public int hashCode()

      Returns hash code associated with the object instance.
      Overrides:
        `hashCode` in class `java.lang.Object`
      Returns:
        hash code value.

    - #### toString

          public java.lang.String toString()

      Overrides:
        `toString` in class `java.lang.Object`