Class WorkingTime
- java.lang.Object
-
- com.aspose.tasks.WorkingTime
-
public class WorkingTime extends Object
Represents a working time during a weekday.
-
-
Constructor Summary
Constructors Constructor Description WorkingTime()
Deprecated.This constructor is obsolete and will be removed after the release 22.8.WorkingTime(double fromTime, double toTime)
Initializes a new instance of theWorkingTime
class with an interval item with the specified start and finish times.WorkingTime(int fromHours, int toHours)
Initializes a new instance of theWorkingTime
class with an interval item with the specified start and finish times.WorkingTime(Date fromTime, Date toTime)
Initializes a new instance of theWorkingTime
class with a interval with the specified start and finish times.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description boolean
equals(Object obj)
Checks that the objects are equal.Date
getFrom()
Gets the beginning of a working time.Date
getFromTime()
Deprecated.This property is obsolete and will be removed after the release 22.8.Date
getTo()
Gets the end of a working time.Date
getToTime()
Deprecated.This property is obsolete and will be removed after the release 22.8.int
hashCode()
Returns a hash code value for the instance of theWorkingTime
class.void
setFromTime(Date value)
Deprecated.This property is obsolete and will be removed after the release 22.8.void
setToTime(Date value)
Deprecated.This property is obsolete and will be removed after the release 22.8.
-
-
-
Constructor Detail
-
WorkingTime
public WorkingTime(Date fromTime, Date toTime)
Initializes a new instance of the
WorkingTime
class with a interval with the specified start and finish times.- Parameters:
fromTime
- interval start timetoTime
- interval end time
-
WorkingTime
@Deprecated public WorkingTime()
Deprecated.This constructor is obsolete and will be removed after the release 22.8. Please use WorkingTime(DateTime, DateTime) instead.Initializes a new instance of the
WorkingTime
class with aWorkingTime
interval item as 24h
-
WorkingTime
public WorkingTime(double fromTime, double toTime)
Initializes a new instance of the
WorkingTime
class with an interval item with the specified start and finish times.The overload of WorkingTime ctor can be used to initialize interval's start and end using TimeSpans:
[C#] var wt = new WorkingTime(new TimeSpan(9, 0, 0), new TimeSpan(18, 0, 0));
- Parameters:
fromTime
- Interval's start time represented bydouble
struct.toTime
- Interval's end time represented bydouble
struct.- Throws:
com.aspose.ms.System.ArgumentException
- When toTime less than of equal to toTime argument or when interval between fromTime and toTime is greater than 24 hours.
-
WorkingTime
public WorkingTime(int fromHours, int toHours)
Initializes a new instance of the
WorkingTime
class with an interval item with the specified start and finish times.The overload of WorkingTime ctor can be used to initialize interval's start and end using whole hours:
[C#] var wt = new WorkingTime(9, 13);
- Parameters:
fromHours
- Interval's start time represented by whole number of hours (0-24).toHours
- Interval's end time represented by whole number of hours (0-24).- Throws:
com.aspose.ms.System.ArgumentException
- When toTime less than of equal to toTime argument or when interval between fromTime and toTime is greater than 24 hours.
-
-
Method Detail
-
equals
public boolean equals(Object obj)
Checks that the objects are equal.
-
getFrom
public final Date getFrom()
Gets the beginning of a working time.
- Returns:
- the beginning of a working time.
-
getFromTime
@Deprecated public final Date getFromTime()
Deprecated.This property is obsolete and will be removed after the release 22.8. Please use From property instead.Gets the beginning of a working time.
- Returns:
- the beginning of a working time.
-
setFromTime
@Deprecated public final void setFromTime(Date value)
Deprecated.This property is obsolete and will be removed after the release 22.8. Please use From property instead.Sets the beginning of a working time.
- Parameters:
value
- the beginning of a working time.
-
getTo
public final Date getTo()
Gets the end of a working time.
- Returns:
- the end of a working time.
-
getToTime
@Deprecated public final Date getToTime()
Deprecated.This property is obsolete and will be removed after the release 22.8. Please use To property instead.Gets the end of a working time.
- Returns:
- the end of a working time.
-
setToTime
@Deprecated public final void setToTime(Date value)
Deprecated.This property is obsolete and will be removed after the release 22.8. Please use To property instead.Sets the end of a working time.
- Parameters:
value
- the end of a working time.
-
hashCode
public int hashCode()
Returns a hash code value for the instance of the
WorkingTime
class.
-
-