From 7ee77637273e2e913cf19f078e9143ae6977f44f Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Fri, 20 Jun 2025 19:25:10 +0300 Subject: Add comprehensive Javadoc documentation for public APIs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 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 --- src/main/java/core/VSTask.java | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) (limited to 'src/main/java/core/VSTask.java') diff --git a/src/main/java/core/VSTask.java b/src/main/java/core/VSTask.java index cc43f1c..81b098e 100644 --- a/src/main/java/core/VSTask.java +++ b/src/main/java/core/VSTask.java @@ -257,7 +257,12 @@ public class VSTask implements Comparable, VSSerializable { } /** - * Runs the task. + * Executes this task by running its associated event. + * This method is called by the task manager when the task's scheduled time arrives. + * If the event requires it, this will also increase the process's timestamps. + * + * @see VSAbstractEvent#onStart() + * @see VSAbstractEvent#shouldIncreaseTimestamps() */ public void run() { if (event.getProcess() == null) @@ -279,18 +284,22 @@ public class VSTask implements Comparable, VSSerializable { } /** - * Sets the task time. + * Sets the scheduled execution time for this task. + * For global-timed tasks, this is in global simulation time units. + * For local-timed tasks, this is in the process's local time units. * - * @param taskTime the task time + * @param taskTime the time when this task should execute */ public void setTaskTime(long taskTime) { this.taskTime = taskTime; } /** - * Sets the process. + * Sets the process that owns this task. + * This method only updates the process if it differs from the current one. + * It also updates the event's process reference. * - * @param process the process + * @param process the process that will own and execute this task */ public void setProcess(VSInternalProcess process) { /* Only do it if the process differs */ -- cgit v1.2.3