com.h3c.sdn.misc.net

## Class L2CostDTO

- java.lang.Object
- - com.h3c.sdn.misc.net.L2CostDTO

- All Implemented Interfaces:
    L2Cost

      public class L2CostDTO
      extends Object
      implements L2Cost

  Represents the route cost between two switches.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `L2CostDTO()` Creates the empty L2Cost.
    `L2CostDTO(int cost)` Creates the L2Cost with the given cost.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `setValue(int cost)` Sets the path cost.
    `int` | `value()` Retrieves the numeric value representing the cost of an L2 path.

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

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

- - ### Constructor Detail

    - #### L2CostDTO

          public L2CostDTO()

      Creates the empty L2Cost.

    - #### L2CostDTO

          public L2CostDTO(int cost)

      Creates the L2Cost with the given cost.

  - ### Method Detail

    - #### setValue

          public void setValue(int cost)

      Sets the path cost.
      Parameters:
        `cost` - cost to be set

    - #### value

          public int value()

      Description copied from interface: `L2Cost`
      Retrieves the numeric value representing the cost of an L2 path.
      Specified by:
        `value` in interface `L2Cost`
      Returns:
        the cost of the path

Copyright © 2014. All Rights Reserved.