本文整理汇总了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);
}