diff options
| author | Paul Buetow <paul@buetow.org> | 2025-06-20 19:25:10 +0300 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2025-06-20 19:25:10 +0300 |
| commit | 7ee77637273e2e913cf19f078e9143ae6977f44f (patch) | |
| tree | 2cda0f82a7bf4c6f76e115f57e28de18d744d5e6 /src/main/java/events/VSCopyableEvent.java | |
| parent | 70fc0505b223f7bf17d3671d0532773359cf7858 (diff) | |
Add comprehensive Javadoc documentation for public APIs
- Document core classes: VSTask, VSMessage, VSInternalProcess
- Document event interfaces: VSAbstractEvent, VSCopyableEvent, VSTime
- Document timestamp events: VSTimestampTriggeredEvent, VSLamportTimestampEvent
- Document protocol framework: VSAbstractProtocol methods
- Document VSSimulator and VSRegisteredEvents
- Add detailed method descriptions with parameter and return value docs
- Include usage examples and cross-references between related classes
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
Diffstat (limited to 'src/main/java/events/VSCopyableEvent.java')
| -rw-r--r-- | src/main/java/events/VSCopyableEvent.java | 23 |
1 files changed, 19 insertions, 4 deletions
diff --git a/src/main/java/events/VSCopyableEvent.java b/src/main/java/events/VSCopyableEvent.java index 23125ce..0b93f9e 100644 --- a/src/main/java/events/VSCopyableEvent.java +++ b/src/main/java/events/VSCopyableEvent.java @@ -1,16 +1,31 @@ package events; /** - * The interface VSCopyableEvent, all events which implement this class - * are copyable. + * Interface for events that support copying. + * Events that implement this interface can be duplicated, which is useful + * for creating multiple instances of the same event or for event scheduling. + * + * <p>To make an event copyable:</p> + * <ol> + * <li>Implement this interface</li> + * <li>Override initCopy() to copy all event-specific state</li> + * <li>The framework will handle creating the new instance</li> + * </ol> + * + * <p>Events that don't implement this interface will throw + * {@link exceptions.VSEventNotCopyableException} when copy is attempted.</p> * + * @see VSAbstractEvent#getCopy() + * @see exceptions.VSEventNotCopyableException * @author Paul C. Buetow */ public interface VSCopyableEvent { /** - * Fills a copy of this event with its values + * Initializes a copy of this event with all necessary state. + * This method should copy all event-specific fields to the provided copy. + * The copy will already be initialized with the same process and basic properties. * - * @param copy The copy + * @param copy the event instance to initialize with this event's state */ public void initCopy(VSAbstractEvent copy); } |
