A factory class for creating and managing CustomVertex objects to ensure that only unique vertices are maintained in memory. This implementation uses a caching mechanism to avoid creating multiple objects with the same properties.
- Author
- aegge.nosp@m.rth@.nosp@m.ethz..nosp@m.ch
- Version
- 1.0
◆ createObject()
| CustomVertex ch.routify.graph.CustomVertexFactory.createObject |
( |
double | latitude, |
|
|
double | longitude, |
|
|
Long | osmId ) |
|
inline |
Creates a CustomVertex object or retrieves an existing one from the cache with the same properties.
- Parameters
-
| latitude | The latitude of the vertex. |
| longitude | The longitude of the vertex. |
| isTunnel | Flag indicating whether the vertex is part of a tunnel. |
| isBridge | Flag indicating whether the vertex is part of a bridge. |
| osmId | The OpenStreetMap identifier for the vertex. |
- Returns
- A
CustomVertex instance with the specified properties. If an instance with the same properties already exists, it is returned instead of creating a new one.
The documentation for this class was generated from the following file: