@@ -22,7 +22,6 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
2222SOFTWARE.
2323*/
2424
25-
2625using NodaTime ;
2726using System ;
2827using System . Collections . Generic ;
@@ -34,10 +33,14 @@ namespace Point85.ShiftSharp.Schedule
3433 /// </summary>
3534 public class Rotation : Named , IComparable < Rotation >
3635 {
37- // working periods in the rotation
36+ /// <summary>
37+ /// working periods in the rotation
38+ /// </summary>
3839 public List < RotationSegment > RotationSegments { get ; private set ; } = new List < RotationSegment > ( ) ;
3940
40- // list of working and non-working days
41+ /// <summary>
42+ /// list of working and non-working days
43+ /// </summary>
4144 private List < TimePeriod > periods ;
4245
4346 // name of the day off time period
@@ -60,33 +63,26 @@ static Rotation()
6063 DAY_OFF = dayOff ;
6164 }
6265
63- /**
64- * Default constructor
65- */
66+ /// <summary>
67+ /// default constructor
68+ /// </summary>
6669 public Rotation ( ) : base ( )
6770 {
6871 }
6972
70- /**
71- * Constructor
72- *
73- * @param name
74- * Rotation name
75- * @param description
76- * Description
77- * @throws Exception
78- * Exception
79- */
73+ /// <summary>
74+ /// Constructor
75+ /// </summary>
76+ /// <param name="name">name of rotation</param>
77+ /// <param name="description">description of rotation</param>
8078 public Rotation ( string name , string description ) : base ( name , description )
8179 {
82-
8380 }
8481
85- /**
86- * Get the shifts and off-shifts in the rotation
87- *
88- * @return List of periods
89- */
82+ /// <summary>
83+ /// get the shifts and off-shifts in the rotation
84+ /// </summary>
85+ /// <returns>List of time periods</returns>
9086 public List < TimePeriod > GetPeriods ( )
9187 {
9288 if ( periods == null )
@@ -114,36 +110,31 @@ public List<TimePeriod> GetPeriods()
114110 }
115111 }
116112 }
117-
118113 return periods ;
119114 }
120115
121- /**
122- * Get the number of days in the rotation
123- *
124- * @return Day count
125- */
126-
116+ /// <summary>
117+ /// Get the number of days in the rotation
118+ /// </summary>
119+ /// <returns></returns>
127120 public int GetDayCount ( )
128121 {
129122 return GetPeriods ( ) . Count ;
130123 }
131124
132- /**
133- * Get the duration of this rotation
134- *
135- * @return Duration
136- */
125+ /// <summary>
126+ /// Get the duration of this rotation
127+ /// </summary>
128+ /// <returns>Duration</returns>
137129 public Duration GetDuration ( )
138130 {
139131 return Duration . FromDays ( GetPeriods ( ) . Count ) ;
140132 }
141133
142- /**
143- * Get the shift rotation's total working time
144- *
145- * @return Duration of working time
146- */
134+ /// <summary>
135+ /// Get the shift rotation's total working time
136+ /// </summary>
137+ /// <returns>Duration</returns>
147138 public Duration GetWorkingTime ( )
148139 {
149140 Duration sum = Duration . Zero ;
@@ -158,20 +149,14 @@ public Duration GetWorkingTime()
158149 return sum ;
159150 }
160151
161- /**
162- * Add a working period to this rotation. A working period starts with a
163- * shift and specifies the number of days on and days off
164- *
165- * @param startingShift
166- * {@link Shift} that starts the period
167- * @param daysOn
168- * Number of days on shift
169- * @param daysOff
170- * Number of days off shift
171- * @return {@link RotationSegment}
172- * @throws Exception
173- * Exception
174- */
152+ /// <summary>
153+ /// Add a working period to this rotation. A working period starts with a
154+ /// shift and specifies the number of days on and days off.
155+ /// </summary>
156+ /// <param name="startingShift">Starting shift of rotation</param>
157+ /// <param name="daysOn">Number of day on shift</param>
158+ /// <param name="daysOff">Number of days off shift</param>
159+ /// <returns>Part of the rotation</returns>
175160 public RotationSegment AddSegment ( Shift startingShift , int daysOn , int daysOff )
176161 {
177162 if ( startingShift == null )
@@ -184,14 +169,20 @@ public RotationSegment AddSegment(Shift startingShift, int daysOn, int daysOff)
184169 return segment ;
185170 }
186171
172+ /// <summary>
173+ /// Compare thsi rotation to another rotation
174+ /// </summary>
175+ /// <param name="other">Other rotation</param>
176+ /// <returns></returns>
187177 public int CompareTo ( Rotation other )
188178 {
189179 return Name . CompareTo ( other . Name ) ;
190180 }
191181
192- /**
193- * Build a string representation of this rotation
194- */
182+ /// <summary>
183+ /// Build a string representation of this rotation
184+ /// </summary>
185+ /// <returns>String</returns>
195186 public override string ToString ( )
196187 {
197188 string named = base . ToString ( ) ;
0 commit comments