コード例 #1
0
        /// <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);
            }
        }
コード例 #2
0
 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);
     }
 }
コード例 #3
0
        /// <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);
            }
        }
コード例 #4
0
 /// <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>();
 }
コード例 #5
0
 /// <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>();
 }
コード例 #6
0
 /// <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;
 }
コード例 #7
0
 /// <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;
 }