WorkUnit

Inheritance: java.lang.Object

public class WorkUnit

Represents working hours.

Constructors

ConstructorDescription
WorkUnit(Date from, Date to)Initializes a new instance of the WorkUnit class.

Methods

MethodDescription
getFrom()Gets the From date.
getTo()Gets the To date.
getWorkingHours()Gets the duration of working hours.
setFrom(Date value)Sets the From date.
setTo(Date value)Sets the To date.
setWorkingHours(double value)Sets the duration of working hours.

WorkUnit(Date from, Date to)

public WorkUnit(Date from, Date to)

Initializes a new instance of the WorkUnit class. Creates new WorkUnit object with the specified From and To dates.

Parameters:

ParameterTypeDescription
fromjava.util.DateStart date of working hours.
tojava.util.DateFinish date of working hours.

getFrom()

public final Date getFrom()

Gets the From date.

Returns: java.util.Date - the From date.

getTo()

public final Date getTo()

Gets the To date.

Returns: java.util.Date - the To date.

getWorkingHours()

public final double getWorkingHours()

Gets the duration of working hours.

Returns: double - the duration of working hours.

setFrom(Date value)

public void setFrom(Date value)

Sets the From date.

Parameters:

ParameterTypeDescription
valuejava.util.Datethe From date.

setTo(Date value)

public final void setTo(Date value)

Sets the To date.

Parameters:

ParameterTypeDescription
valuejava.util.Datethe To date.

setWorkingHours(double value)

public final void setWorkingHours(double value)

Sets the duration of working hours.

Parameters:

ParameterTypeDescription
valuedoublethe duration of working hours.