MATSIM
VisSignal.java
Go to the documentation of this file.
1 /* *********************************************************************** *
2  * project: org.matsim.*
3  * OTFSignalPosition
4  * *
5  * *********************************************************************** *
6  * *
7  * copyright : (C) 2010 by the members listed in the COPYING, *
8  * LICENSE and WARRANTY file. *
9  * email : info at matsim dot org *
10  * *
11  * *********************************************************************** *
12  * *
13  * This program is free software; you can redistribute it and/or modify *
14  * it under the terms of the GNU General Public License as published by *
15  * the Free Software Foundation; either version 2 of the License, or *
16  * (at your option) any later version. *
17  * See also COPYING, LICENSE and WARRANTY file *
18  * *
19  * *********************************************************************** */
20 package org.matsim.lanes;
21 
22 import java.io.Serializable;
23 import java.util.ArrayList;
24 import java.util.List;
25 
27 
28 
33 public final class VisSignal implements Serializable {
34 
35  private String id;
37  private List<VisLinkWLanes> turningMoveRestrictions = null;
38  private String systemId;
39 
40  public VisSignal(String systemId, String signalId) {
41  this.systemId = systemId;
42  this.id = signalId;
43  }
44 
45  public String getId(){
46  return this.id;
47  }
48 
49  public String getSignalSystemId(){
50  return this.systemId;
51  }
52 
53  public void setState(SignalGroupState state){
54  this.state = state;
55  }
56 
58  return this.state;
59  }
60 
61  public List<VisLinkWLanes> getTurningMoveRestrictions(){
62  return this.turningMoveRestrictions;
63  }
64 
66  if (this.turningMoveRestrictions == null){
67  this.turningMoveRestrictions = new ArrayList<VisLinkWLanes>();
68  }
69  this.turningMoveRestrictions.add(toLink);
70  }
71 
72 }
List< VisLinkWLanes > turningMoveRestrictions
Definition: VisSignal.java:37
VisSignal(String systemId, String signalId)
Definition: VisSignal.java:40
SignalGroupState state
Definition: VisSignal.java:36
SignalGroupState getSignalGroupState()
Definition: VisSignal.java:57
List< VisLinkWLanes > getTurningMoveRestrictions()
Definition: VisSignal.java:61
void addTurningMoveRestriction(VisLinkWLanes toLink)
Definition: VisSignal.java:65
void setState(SignalGroupState state)
Definition: VisSignal.java:53