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 TypeMethodDescriptionboolean
equals
(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:Notification
How long the product is available.- Specified by:
getExpirationDate
in interfaceNotification
- Returns:
- how long the product is available.
-
getProductId
Description copied from interface:Notification
The product that is available.- Specified by:
getProductId
in interfaceNotification
- Returns:
- which product is available.
-
equals
A comparison method to see if two notifications are equal.- Specified by:
equals
in interfaceNotification
- Parameters:
that
- Notification- Returns:
- boolean
-