- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Represents a rule how to partition a day into disjunct clock intervals.
Method SummaryModifier and TypeMethodDescription
DayPartitionRule rule)(Combines this rule with another one.
PlainDate date)(Obtains the partitions for given date if defined.
PlainDate date)(Determines if given date is excluded from creating day partitions.
PlainTimestamp timestamp)(Does this rule match given timestamp such that any rule interval contains it?
Obtains the partitions for given date if defined.
All resulting partitions are half-open clock intervals (start inclusive and end exclusive) and refer only to given calendar date.
Combines this rule with another one.
The new rule will never take into account dates which are excluded by either this rule or the given one.
rule- another day partition rule to be combined with this one
- new combined rule
- See Also:
isExcludeddefault boolean isExcluded(PlainDate date)
Determines if given date is excluded from creating day partitions.
The default implementation is equivalent to
date- the calendar date to be checked for exclusion
matchesdefault boolean matches(PlainTimestamp timestamp)
Does this rule match given timestamp such that any rule interval contains it?
Example: If this rule describes shop opening times then this method yields the answer to the question if the shop is open at given timestamp.
timestamp- the timestamp to be checked
trueif given timestamp fits to this rule else