com.h3c.of.lib.instr

## Class InstrMutableAction

- java.lang.Object
- - com.h3c.of.lib.OpenflowStructure
  - - com.h3c.of.lib.instr.Instruction
    - - com.h3c.of.lib.instr.InstrMutableAction

- All Implemented Interfaces:
    MutableObject, MutableStructure, Structure
  Direct Known Subclasses:
    InstrMutableApplyActions, InstrMutableWriteActions

      public abstract class InstrMutableAction
      extends Instruction
      implements MutableStructure

  Mutable subclass of `InstrAction`.

- - ### Field Summary

    - ### Fields inherited from class com.h3c.of.lib.OpenflowStructure

      `version`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `InstrMutableAction` | `addAction(Action action)` Adds the specified action to this instruction.
    `String` | `toDebugString(int indent)` Returns a string representation useful for debugging.
    `String` | `toString()`
    `protected abstract void` | `validateActions()` Subclasses should validate the actions, and silently return if all is well.
    `boolean` | `writable()` Returns true if this mutable object is still writable.

    - ### Methods inherited from class com.h3c.of.lib.instr.Instruction

      `getInstructionType, getTotalLength, toDebugString`

    - ### Methods inherited from class com.h3c.of.lib.OpenflowStructure

      `getVersion, hex, hex, validate`

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

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

    - ### Methods inherited from interface com.h3c.of.lib.MutableStructure

      `toImmutable`

    - ### Methods inherited from interface com.h3c.of.lib.Structure

      `getVersion, toDebugString`

- - ### Method Detail

    - #### writable

          public boolean writable()

      Description copied from interface: `MutableObject`
      Returns true if this mutable object is still writable. That is, the `#toImmutable()` method (defined on a sub-interface) has not yet been invoked.
      Specified by:
        `writable` in interface `MutableObject`
      Returns:
        true if this mutable object is still writable

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Instruction`

    - #### addAction

          public InstrMutableAction addAction(Action action)

      Adds the specified action to this instruction.
      Parameters:
        `action` - the action to add
      Returns:
        self, for chaining
      Throws:
        `InvalidMutableException` - if this instance is no longer writable
        `NullPointerException` - if action is null

    - #### validateActions

          protected abstract void validateActions()

      Subclasses should validate the actions, and silently return if all is well. If a problem is detected, a ValidationException should be thrown.
      Throws:
        `ValidationException` - if a problem with the actions

    - #### toDebugString

          public String toDebugString(int indent)

      Description copied from class: `Instruction`
      Returns a string representation useful for debugging. This default implementation delegates to `Instruction.toString()`, but subclasses are free to override this behavior.
      Overrides:
        `toDebugString` in class `Instruction`
      Parameters:
        `indent` - the number of spaces with which to prefix each line
      Returns:
        a (possibly multi-line) string representation of this instruction

Copyright © 2014. All Rights Reserved.