Class MaterialAddedEvent
java.lang.Object
com.university.bookstore.observer.MaterialAddedEvent
- All Implemented Interfaces:
MaterialEvent
Event that occurs when a material is added to the system.
- Since:
- 2024-09-15
- Version:
- 3.0
- Author:
- Navid Mohaghegh
-
Constructor Details
-
MaterialAddedEvent
Creates a new material added event.- Parameters:
material- the material that was added- Throws:
IllegalArgumentException- if material is null
-
-
Method Details
-
getMaterial
Description copied from interface:MaterialEventGets the material associated with this event.- Specified by:
getMaterialin interfaceMaterialEvent- Returns:
- the material
-
getTimestamp
public long getTimestamp()Description copied from interface:MaterialEventGets the timestamp when this event occurred.- Specified by:
getTimestampin interfaceMaterialEvent- Returns:
- the event timestamp in milliseconds
-
getEventType
Description copied from interface:MaterialEventGets the type of this event.- Specified by:
getEventTypein interfaceMaterialEvent- Returns:
- the event type
-
getDescription
Description copied from interface:MaterialEventGets a description of this event.- Specified by:
getDescriptionin interfaceMaterialEvent- Returns:
- the event description
-
equals
-
hashCode
-
toString
-