From 62fe28f0b0b0c9ebde18a6dc33907889ff3aa21b Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Sun, 25 May 2008 05:04:07 +0000 Subject: initial javadoc. --- sources/core/time/VSLamportTime.java | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'sources/core/time/VSLamportTime.java') diff --git a/sources/core/time/VSLamportTime.java b/sources/core/time/VSLamportTime.java index 704b3d5..592507a 100644 --- a/sources/core/time/VSLamportTime.java +++ b/sources/core/time/VSLamportTime.java @@ -1,22 +1,45 @@ package core.time; +/** This class defined how the lamport timestamps are represented. + */ public class VSLamportTime implements VSTime { + /** Specified the global time of the lamport timestamp. It's used for correct painting in the simulator paint area. + */ private long globalTime; + /** Specified the process' local lamport time. + */ private long lamportTime; + /** A simple constructor. + * + * @param globalTime The global time. + * @param lamportTime The local lamport time. + */ public VSLamportTime(long globalTime, long lamportTime) { this.globalTime = globalTime; this.lamportTime = lamportTime; } + /** Getter method. + * + * @return The global time. + */ public long getGlobalTime() { return globalTime; } + /** Getter method. + * + * @return The process' local lamport time. + */ public long getLamportTime() { return lamportTime; } + /** String representation. + * + * @return The string representation of the lamport time. + */ public String toString() { return "(" + lamportTime + ")"; } -- cgit v1.2.3