diff options
| author | Paul Buetow <paul@buetow.org> | 2008-05-25 05:04:07 +0000 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2008-05-25 05:04:07 +0000 |
| commit | 62fe28f0b0b0c9ebde18a6dc33907889ff3aa21b (patch) | |
| tree | 7e473f28a7b80494539aabeb6d04e83eb3090a77 /sources/core/time/VSLamportTime.java | |
| parent | 067fb8bcf8a2d7689d356a591f8e074e6c4840b1 (diff) | |
initial javadoc.
Diffstat (limited to 'sources/core/time/VSLamportTime.java')
| -rw-r--r-- | sources/core/time/VSLamportTime.java | 23 |
1 files changed, 23 insertions, 0 deletions
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 + ")"; } |
