Method
withValue
(
T context,
Integer value,
boolean lenient
)
Source from the content-addressed store, hash-verified
| 1869 | } |
| 1870 | |
| 1871 | @Override |
| 1872 | public T withValue( |
| 1873 | T context, |
| 1874 | Integer value, |
| 1875 | boolean lenient |
| 1876 | ) { |
| 1877 | |
| 1878 | PlainDate date = context.get(CALENDAR_DATE); |
| 1879 | |
| 1880 | if ((value == null) || (!lenient && !this.isValid(context, value))) { |
| 1881 | throw new IllegalArgumentException( |
| 1882 | "Invalid value: " + value + " (context=" + context + ")"); |
| 1883 | } |
| 1884 | |
| 1885 | return context.with( |
| 1886 | CALENDAR_DATE, |
| 1887 | this.setWeek(date, value.intValue()) |
| 1888 | ); |
| 1889 | |
| 1890 | } |
| 1891 | |
| 1892 | private int getWeek(PlainDate date) { |
| 1893 | |
Callers
nothing calls this directly
Tested by
no test coverage detected