Package gov.usgs.earthquake.distribution
Class DefaultNotification
java.lang.Object
gov.usgs.earthquake.distribution.DefaultNotification
- All Implemented Interfaces:
Notification
- Direct Known Subclasses:
URLNotification
A DefaultNotification is a implementation of the Notification interface. No
location information is stored about products, and must be tracked
separately.
-
Constructor Summary
ConstructorsConstructorDescriptionDefaultNotification(ProductId id, Date expirationDate) Construct a DefaultNotification. -
Method Summary
Modifier and TypeMethodDescriptionbooleanequals(Notification that) A comparison method to see if two notifications are equal.How long the product is available.The product that is available.
-
Constructor Details
-
DefaultNotification
Construct a DefaultNotification.- Parameters:
id- the product that is available.expirationDate- how long the product is available.
-
-
Method Details
-
getExpirationDate
Description copied from interface:NotificationHow long the product is available.- Specified by:
getExpirationDatein interfaceNotification- Returns:
- how long the product is available.
-
getProductId
Description copied from interface:NotificationThe product that is available.- Specified by:
getProductIdin interfaceNotification- Returns:
- which product is available.
-
equals
A comparison method to see if two notifications are equal.- Specified by:
equalsin interfaceNotification- Parameters:
that- Notification- Returns:
- boolean
-