/// <summary> /// Constructor /// </summary> /// <param name="wayID">Identification about Way</param> /// <param name="segment">Segment containing this Way</param> /// <param name="lanes">Lanes this Way contains</param> public Way(WayID wayID, Segment segment, ICollection <Lane> lanes) { this.wayID = wayID; this.segment = segment; // Create Dictionary this.lanes = new Dictionary <LaneID, Lane>(); foreach (Lane lane in lanes) { this.lanes.Add(lane.LaneID, lane); } }
public override bool Equals(object obj) { if (obj is WayID) { WayID wid = (WayID)obj; return(wid.wayNumber == wayNumber && wid.segmentID.Equals(segmentID)); } else { return(false); } }
/// <summary> /// Constructor /// </summary> /// <param name="wayID">Identification about Way</param> /// <param name="segment">Segment containing this Way</param> /// <param name="lanes">Lanes this Way contains</param> public Way(WayID wayID, Segment segment, ICollection<Lane> lanes) { this.wayID = wayID; this.segment = segment; // Create Dictionary this.lanes = new Dictionary<LaneID, Lane>(); foreach (Lane lane in lanes) { this.lanes.Add(lane.LaneID, lane); } }
/// <summary> /// Constructor /// </summary> /// <param name="wayID">Identification about Way</param> /// <param name="segment">Segment containing this Way</param> public Way(WayID wayID, Segment segment) { this.wayID = wayID; this.segment = segment; lanes = new Dictionary <LaneID, Lane>(); }
/// <summary> /// Constructor /// </summary> /// <param name="wayID">Identification about Way</param> /// <param name="segment">Segment containing this Way</param> public Way(WayID wayID, Segment segment) { this.wayID = wayID; this.segment = segment; lanes = new Dictionary<LaneID, Lane>(); }
/// <summary> /// Constructor /// </summary> /// <param name="wayID">Way identification information</param> /// <param name="laneNumber">Number of Lane in the Way</param> public LaneID(WayID wayID, int laneNumber) { this.wayID = wayID; this.laneNumber = laneNumber; }