...
The java.util.Calendar
class provides a compareTo()
method and an after()
method. The after()
method is documented in the Java API Reference [API 20062014] as follows:
The
after()
method returns whether thisCalendar
represents a time after the time represented by the specifiedObject
. This method is equivalent to
compareTo(when) > 0
if and only ifwhen
is aCalendar
instance. Otherwise, the method returnsfalse
.
...
Guideline 4-6 / EXTEND-6: Understand how a superclass can affect subclass behavior |
Bibliography
Item 16, "Favor Composition over Inheritance" | |
Design Patterns: Elements of Reusable Object-Oriented Software (p. 20) | |
"Using Prototypical Objects to Implement Shared Behavior in Object-Oriented Systems" |
...