本文整理匯總了Java中java.time.DayOfWeek.WEDNESDAY屬性的典型用法代碼示例。如果您正苦於以下問題:Java DayOfWeek.WEDNESDAY屬性的具體用法?Java DayOfWeek.WEDNESDAY怎麽用?Java DayOfWeek.WEDNESDAY使用的例子?那麽, 這裏精選的屬性代碼示例或許可以為您提供幫助。您也可以進一步了解該屬性所在類java.time.DayOfWeek
的用法示例。
在下文中一共展示了DayOfWeek.WEDNESDAY屬性的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: data_week
@DataProvider(name="IsoWeekData")
Object[][] data_week() {
return new Object[][] {
{LocalDate.of(1969, 12, 29), DayOfWeek.MONDAY, 1, 1970},
{LocalDate.of(2012, 12, 23), DayOfWeek.SUNDAY, 51, 2012},
{LocalDate.of(2012, 12, 24), DayOfWeek.MONDAY, 52, 2012},
{LocalDate.of(2012, 12, 27), DayOfWeek.THURSDAY, 52, 2012},
{LocalDate.of(2012, 12, 28), DayOfWeek.FRIDAY, 52, 2012},
{LocalDate.of(2012, 12, 29), DayOfWeek.SATURDAY, 52, 2012},
{LocalDate.of(2012, 12, 30), DayOfWeek.SUNDAY, 52, 2012},
{LocalDate.of(2012, 12, 31), DayOfWeek.MONDAY, 1, 2013},
{LocalDate.of(2013, 1, 1), DayOfWeek.TUESDAY, 1, 2013},
{LocalDate.of(2013, 1, 2), DayOfWeek.WEDNESDAY, 1, 2013},
{LocalDate.of(2013, 1, 6), DayOfWeek.SUNDAY, 1, 2013},
{LocalDate.of(2013, 1, 7), DayOfWeek.MONDAY, 2, 2013},
};
}
示例2: setup
@Before
public void setup() {
// Create shifts
Shift shift0 = new Shift(0, DayOfWeek.MONDAY, LocalTime.of(16, 45), LocalTime.of(19, 45));
Shift shift1 = new Shift(1, DayOfWeek.TUESDAY, LocalTime.of(18, 0), LocalTime.of(21, 0));
Shift shift2 = new Shift(2, DayOfWeek.WEDNESDAY, LocalTime.of(19, 0), LocalTime.of(21, 0));
Shift shift3 = new Shift(3, DayOfWeek.THURSDAY, LocalTime.of(18, 30), LocalTime.of(21, 30));
Shift shift4 = new Shift(4, DayOfWeek.FRIDAY, LocalTime.of(17, 15), LocalTime.of(20, 45));
this.shifts.add(shift0);
this.shifts.add(shift1);
this.shifts.add(shift2);
this.shifts.add(shift3);
this.shifts.add(shift4);
// Required shifts for courses
Set<Shift> shiftSet0 = new HashSet<>();
shiftSet0.add(shift0);
Set<Shift> shiftSet1 = new HashSet<>();
shiftSet1.add(shift1);
shiftSet1.add(shift4);
Set<Shift> shiftSet2 = new HashSet<>();
shiftSet2.add(shift1);
shiftSet2.add(shift2);
shiftSet2.add(shift3);
Set<Shift> shiftSet3 = new HashSet<>();
shiftSet3.add(shift0);
shiftSet3.add(shift2);
shiftSet3.add(shift3);
shiftSet3.add(shift4);
// Create courses
Course course0 = new Course(0, "CS 301", new CourseRequirements(shiftSet1, 1, 3, CourseIntensity.MEDIUM, null, 0));
Course course1 = new Course(1, "CS 302", new CourseRequirements(shiftSet2, 2, 2, CourseIntensity.HIGH, null, 0));
Course course2 = new Course(2, "CS 577", new CourseRequirements(shiftSet0, 1, 2, CourseIntensity.LOW, null, 0));
Course course3 = new Course(3, "EMA 201", new CourseRequirements(shiftSet3, 4, 4, CourseIntensity.HIGH, null, 0));
Course course4 = new Course(4, "ECE 210", new CourseRequirements(shiftSet0, 1, 1, CourseIntensity.LOW, null, 0));
this.courses.add(course0);
this.courses.add(course1);
this.courses.add(course2);
this.courses.add(course3);
this.courses.add(course4);
}