MATSIM
Public Member Functions | Private Attributes | List of all members
org.matsim.pt.router.CustomDataManager Class Reference

Public Member Functions

void setToNodeCustomData (final Object data)
 
Object getFromNodeCustomData ()
 
void initForLink (final Link link)
 
void storeTmpData ()
 
void reset ()
 

Private Attributes

final HashMap< Node, Object > data = new HashMap<Node, Object>()
 
Node fromNode = null
 
Node toNode = null
 
Object tmpToNodeData = null
 

Detailed Description

A helper class to store custom data for TransitTravelDisutility which can be used to e.g. keep track of paid fares during the routing process. The stored data will be invalidated for each new routing request.

Author
mrieser / senozon

Definition at line 34 of file CustomDataManager.java.

Member Function Documentation

◆ setToNodeCustomData()

void org.matsim.pt.router.CustomDataManager.setToNodeCustomData ( final Object  data)

◆ getFromNodeCustomData()

Object org.matsim.pt.router.CustomDataManager.getFromNodeCustomData ( )
Parameters
node
Returns
the stored data for the given node, or null if there is no data stored yet.

Definition at line 50 of file CustomDataManager.java.

50  {
51  return this.data.get(this.fromNode);
52  }
final HashMap< Node, Object > data

◆ initForLink()

void org.matsim.pt.router.CustomDataManager.initForLink ( final Link  link)

◆ storeTmpData()

void org.matsim.pt.router.CustomDataManager.storeTmpData ( )

Definition at line 60 of file CustomDataManager.java.

Referenced by org.matsim.pt.router.TransitLeastCostPathTree.addToPendingNodes().

60  {
61  if (this.tmpToNodeData != null) {
62  this.data.put(this.toNode, this.tmpToNodeData);
63  }
64  }
final HashMap< Node, Object > data

◆ reset()

void org.matsim.pt.router.CustomDataManager.reset ( )

Member Data Documentation

◆ data

final HashMap<Node, Object> org.matsim.pt.router.CustomDataManager.data = new HashMap<Node, Object>()
private

◆ fromNode

Node org.matsim.pt.router.CustomDataManager.fromNode = null
private

Definition at line 37 of file CustomDataManager.java.

◆ toNode

Node org.matsim.pt.router.CustomDataManager.toNode = null
private

Definition at line 38 of file CustomDataManager.java.

◆ tmpToNodeData

Object org.matsim.pt.router.CustomDataManager.tmpToNodeData = null
private

Definition at line 40 of file CustomDataManager.java.


The documentation for this class was generated from the following file: