Details
Description
The default TimeRange constructor creates a range from 0 to Long.MAX_VALUE and sets an allTime flag to true. This flag allows some performance optimizations when comparing or using TimeRanges.
This flag is not set, however, if you call "new TimeRange(0L)" or "new TimeRange(0L, Long.MAX_VALUE)", even though both of these create a logically equivalent TimeRange to "new TimeRange()". Since TimeRanges are immutable and detecting this condition is trivial, we should set the flag automatically in the explicit constructors when appropriate.