目录

TimeOfWeek

Class Info

public class TimeOfWeek

Represents a time point on a day of the week.

Public Constructor Summary

Constructor Name

TimeOfWeek()

Default constructor.

Public Method Summary

Qualifier and Type

Method Name and Description

static TimeOfWeek

newInstance(int day, String time)

Creates an instance of the TimeOfWeek class.

int

getDay()

Obtains the day of the week.

String

getTime()

Obtains the time point on a day.

[h2]newInstance

Method

public static TimeOfWeek newInstance(int day, String time)

Creates an instance of the TimeOfWeek class.

Parameters

Name

Description

day

  • 0: Sunday
  • 1: Monday
  • 2: Tuesday
  • 3: Wednesday
  • 4: Thursday
  • 5: Friday
  • 6: Saturday

time

24-hour time point on a day, in hhmm format. The value ranges from 0000 to 2359.

Returns

Type

Parameter desc

TimeOfWeek

TimeOfWeek object.

[h2]getDay

Method

public int getDay()

Obtains the day of the week.

Returns

Type

Description

int

  • 0: Sunday
  • 1: Monday
  • 2: Tuesday
  • 3: Wednesday
  • 4: Thursday
  • 5: Friday
  • 6: Saturday

[h2]getTime

Method

public String getTime()

Obtains the time point on a day.

Returns

Type

Description

String

24-hour time point on a day, in hhmm format. The value ranges from 0000 to 2359.