| 322 | * @since 3.13/4.10 |
| 323 | */ |
| 324 | public PlainTime getStart(PlainTime context) { |
| 325 | |
| 326 | PlainTime compare = ( |
| 327 | (context.getHour() == 24) |
| 328 | ? PlainTime.midnightAtStartOfDay() |
| 329 | : context); |
| 330 | PlainTime last = this.codeMap.lastKey(); |
| 331 | |
| 332 | for (PlainTime key : this.codeMap.keySet()) { |
| 333 | if (compare.isSimultaneous(key)) { |
| 334 | return key; |
| 335 | } else if (compare.isBefore(key)) { |
| 336 | break; |
| 337 | } else { |
| 338 | last = key; |
| 339 | } |
| 340 | } |
| 341 | |
| 342 | return last; |
| 343 | |
| 344 | } |
| 345 | |
| 346 | /** |
| 347 | * <p>Determines the end of the day period which covers given clock time. </p> |