diff options
| author | Paul Buetow <paul@buetow.org> | 2008-05-25 08:10:13 +0000 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2008-05-25 08:10:13 +0000 |
| commit | c015d586d22b69078b6da61858e5675793856b0b (patch) | |
| tree | efbc9881cf59363abef52a0beb5eedf9e81a224a /sources/core/time | |
| parent | 62fe28f0b0b0c9ebde18a6dc33907889ff3aa21b (diff) | |
JAutoDoc :)
Diffstat (limited to 'sources/core/time')
| -rw-r--r-- | sources/core/time/VSLamportTime.java | 28 | ||||
| -rw-r--r-- | sources/core/time/VSTime.java | 16 | ||||
| -rw-r--r-- | sources/core/time/VSVectorTime.java | 39 |
3 files changed, 71 insertions, 12 deletions
diff --git a/sources/core/time/VSLamportTime.java b/sources/core/time/VSLamportTime.java index 592507a..4ee5ebd 100644 --- a/sources/core/time/VSLamportTime.java +++ b/sources/core/time/VSLamportTime.java @@ -1,16 +1,23 @@ +/* + * VS is (c) 2008 by Paul C. Buetow + * vs@dev.buetow.org + */ package core.time; -/** This class defined how the lamport timestamps are represented. +// TODO: Auto-generated Javadoc +/** + * 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. - */ + + /** 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. - */ + + /** Specified the process' local lamport time. */ private long lamportTime; - /** A simple constructor. + /** + * A simple constructor. * * @param globalTime The global time. * @param lamportTime The local lamport time. @@ -20,7 +27,8 @@ public class VSLamportTime implements VSTime { this.lamportTime = lamportTime; } - /** Getter method. + /** + * Getter method. * * @return The global time. */ @@ -28,7 +36,8 @@ public class VSLamportTime implements VSTime { return globalTime; } - /** Getter method. + /** + * Getter method. * * @return The process' local lamport time. */ @@ -36,7 +45,8 @@ public class VSLamportTime implements VSTime { return lamportTime; } - /** String representation. + /** + * String representation. * * @return The string representation of the lamport time. */ diff --git a/sources/core/time/VSTime.java b/sources/core/time/VSTime.java index ce20ecc..0aebf4a 100644 --- a/sources/core/time/VSTime.java +++ b/sources/core/time/VSTime.java @@ -1,14 +1,24 @@ +/* + * VS is (c) 2008 by Paul C. Buetow + * vs@dev.buetow.org + */ package core.time; -/** This interface is a guidline for general time format classes. +// TODO: Auto-generated Javadoc +/** + * This interface is a guidline for general time format classes. */ public interface VSTime { - /** Getter method. + + /** + * Getter method. * * @return The global time. */ public long getGlobalTime(); - /** String representation. + + /** + * String representation. * * @return The representation of the implementing object as a string. */ diff --git a/sources/core/time/VSVectorTime.java b/sources/core/time/VSVectorTime.java index eb6c0aa..647eb7a 100644 --- a/sources/core/time/VSVectorTime.java +++ b/sources/core/time/VSVectorTime.java @@ -1,14 +1,34 @@ +/* + * VS is (c) 2008 by Paul C. Buetow + * vs@dev.buetow.org + */ package core.time; import java.util.ArrayList; +// TODO: Auto-generated Javadoc +/** + * The Class VSVectorTime. + */ public class VSVectorTime extends ArrayList<Long> implements VSTime { + + /** The global time. */ private long globalTime; + /** + * Instantiates a new vS vector time. + * + * @param globalTime the global time + */ public VSVectorTime(long globalTime) { this.globalTime = globalTime; } + /** + * To long array. + * + * @return the long[] + */ public long[] toLongArray() { final int size = super.size(); final long[] arr = new long[size]; @@ -19,14 +39,27 @@ public class VSVectorTime extends ArrayList<Long> implements VSTime { return arr; } + /** + * Sets the global time. + * + * @param globalTime the new global time + */ public void setGlobalTime(long globalTime) { this.globalTime = globalTime; } + /* (non-Javadoc) + * @see core.time.VSTime#getGlobalTime() + */ public long getGlobalTime() { return globalTime; } + /** + * Gets the copy. + * + * @return the copy + */ public VSVectorTime getCopy() { final VSVectorTime vectorTime = new VSVectorTime(globalTime); final int size = super.size(); @@ -37,6 +70,9 @@ public class VSVectorTime extends ArrayList<Long> implements VSTime { return vectorTime; } + /* (non-Javadoc) + * @see java.util.AbstractCollection#toString() + */ public String toString() { final int size = super.size(); final StringBuffer buffer = new StringBuffer(); @@ -49,6 +85,9 @@ public class VSVectorTime extends ArrayList<Long> implements VSTime { return buffer.toString(); } + /* (non-Javadoc) + * @see java.util.ArrayList#get(int) + */ public Long get(int index) { if (index >= super.size()) return new Long(0); |
