Package org.stubit.random
Class RandomLocalDate.LocalDateBuilder
java.lang.Object
org.stubit.random.RandomLocalDate.LocalDateBuilder
- Enclosing class:
- RandomLocalDate
Builds a random
LocalDate with specified field values (e.g. year, month).-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()dayOfMonth(int day) dayOfWeek(int dayOfWeek) month(int month) year(int year)
-
Constructor Details
-
LocalDateBuilder
public LocalDateBuilder()
-
-
Method Details
-
year
- Parameters:
year- the year for the randomLocalDate- Returns:
- this
-
year
-
month
- Parameters:
month- the month for the randomLocalDate- Returns:
- this
-
month
-
dayOfMonth
- Parameters:
day- the day of the month for the randomLocalDate- Returns:
- this
- Throws:
DateTimeException- ifdayis not a valid day of the month- See Also:
-
dayOfWeek
- Parameters:
dayOfWeek- the day of the week for the randomLocalDate- Returns:
- this
-
dayOfWeek
-
build
- Returns:
- the random
LocalDate
-