org.jgrapht.ext

## Class IntegerEdgeNameProvider<E>

- java.lang.Object
- - org.jgrapht.ext.IntegerEdgeNameProvider<E>

- All Implemented Interfaces:
    EdgeNameProvider<E>

      public class IntegerEdgeNameProvider<E>
      extends Object
      implements EdgeNameProvider<E>

  Assigns a unique integer to represent each edge. Each instance of IntegerEdgeNameProvider maintains an internal map between every edge it has ever seen and the unique integer representing that edge. As a result it is probably desirable to have a separate instance for each distinct graph.
  Author:
    Trevor Harmon

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `IntegerEdgeNameProvider()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `clear()` Clears all cached identifiers, and resets the unique identifier counter.
    `String` | `getEdgeName(E edge)` Returns the String representation of an edge.

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

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

- - ### Constructor Detail

    - #### IntegerEdgeNameProvider

          public IntegerEdgeNameProvider()

  - ### Method Detail

    - #### clear

          public void clear()

      Clears all cached identifiers, and resets the unique identifier counter.

    - #### getEdgeName

          public String getEdgeName(E edge)

      Returns the String representation of an edge.
      Specified by:
        `getEdgeName` in interface `EdgeNameProvider<E>`
      Parameters:
        `edge` - the edge to be named
      Returns:
        the name of the edge

Copyright © 2016. All rights reserved.