Routify Documentation
Loading...
Searching...
No Matches
ch.routify.graph.CustomVertexFactory Class Reference

Public Member Functions

CustomVertex createObject (double latitude, double longitude, Long osmId)
 

Detailed Description

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

Member Function Documentation

◆ 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
latitudeThe latitude of the vertex.
longitudeThe longitude of the vertex.
isTunnelFlag indicating whether the vertex is part of a tunnel.
isBridgeFlag indicating whether the vertex is part of a bridge.
osmIdThe 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: