org.jgrapht.ext

## Class StringNameProvider<V>

- java.lang.Object
- - org.jgrapht.ext.StringNameProvider<V>

- All Implemented Interfaces:
    VertexNameProvider<V>

      public class StringNameProvider<V>
      extends Object
      implements VertexNameProvider<V>

  Generates vertex names by invoking `Object.toString()` on them. This assumes that the vertex's `Object.toString()` method returns a unique String representation for each vertex.
  Author:
    Charles Fry

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `StringNameProvider()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `String` | `getVertexName(V vertex)` Returns the String representation of the unique integer representing a vertex.

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

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

- - ### Constructor Detail

    - #### StringNameProvider

          public StringNameProvider()

  - ### Method Detail

    - #### getVertexName

          public String getVertexName(V vertex)

      Returns the String representation of the unique integer representing a vertex.
      Specified by:
        `getVertexName` in interface `VertexNameProvider<V>`
      Parameters:
        `vertex` - the vertex to be named
      Returns:
        the name of
      See Also:
        `GraphListener.edgeAdded(GraphEdgeChangeEvent)`

Copyright © 2016. All rights reserved.