Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

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 this Calendar represents a time after the time represented by the specified Object. This method is equivalent to
compareTo(when) > 0
if and only if when is a Calendar instance. Otherwise, the method returns false.

...

Secure Coding Guidelines for Java SE, Version 5.0

Guideline 4-6 / EXTEND-6: Understand how a superclass can affect subclass behavior

Bibliography

[API 20062014]

Class Calendar

[Bloch 2008]

Item 16, "Favor Composition over Inheritance"

[Gamma 1995]

Design Patterns: Elements of Reusable Object-Oriented Software (p. 20)

[Lieberman 1986]

"Using Prototypical Objects to Implement Shared Behavior in Object-Oriented Systems"

...