com.h3c.of.ctl.pkt

## Class ExperimenterHint

- java.lang.Object
- - com.h3c.of.ctl.pkt.AbstractHint
  - - com.h3c.of.ctl.pkt.ExperimenterHint

- All Implemented Interfaces:
    Hint

      public class ExperimenterHint
      extends AbstractHint

  A default implementation of an experimenter-defined `Hint`.

  Experimenters may use this class as is, defining their own hint types (using negative integers), and payloads. Alternatively, they may extend this class to provide a richer API on the subclass, tailored to specific payloads.

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static interface` | `ExperimenterHint.Payload` A tag interface to allow the hint payload to be expressed in general terms.

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static String` | `E_NON_NEGATIVE_TYPE`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ExperimenterHint(int experType, ExperimenterHint.Payload payload)` Constructs an experimenter hint, using the given experimenter-defined type and payload.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `ExperimenterHint.Payload` | `getPayload()` Returns the payload.
    `String` | `toString()`

    - ### Methods inherited from class com.h3c.of.ctl.pkt.AbstractHint

      `getEncodedType, getType`

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

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

- - ### Field Detail

    - #### E_NON_NEGATIVE_TYPE

          public static final String E_NON_NEGATIVE_TYPE

  - ### Constructor Detail

    - #### ExperimenterHint

          public ExperimenterHint(int experType,
                          ExperimenterHint.Payload payload)

      Constructs an experimenter hint, using the given experimenter-defined type and payload. Note that the hint type must be a negative number, since positive numbers are reserved for the `standard` hint types.
      Parameters:
        `experType` - the experimenter-defined hint type
        `payload` - the hint payload
      Throws:
        `IllegalArgumentException` - if experType is not negative

  - ### Method Detail

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `AbstractHint`

    - #### getPayload

          public ExperimenterHint.Payload getPayload()

      Returns the payload.
      Returns:
        the payload

Copyright © 2014. All Rights Reserved.