This class allows fields to be saved in any order, but be physically set in a consistent order. This is useful for parsing against formats that allow field values to contradict each other.
Field values are applied in an order where the "larger" fields are set first, making their value less likely to stick. A field is larger than another when it's range duration is longer. If both ranges are the same, then the larger field has the longer duration. If it cannot be determined which field is larger, then the fields are set in the order they were saved.
For example, these fields were saved in this order: dayOfWeek, monthOfYear, dayOfMonth, dayOfYear. When computeMillis is called, the fields are set in this order: monthOfYear, dayOfYear, dayOfMonth, dayOfWeek.
DateTimeParserBucket is mutable and not thread-safe. @author Brian S O'Neill @author Fredrik Borgh @since 1.0
|
|