core.time
Class VSVectorTime

java.lang.Object
  extended by java.util.AbstractCollection<E>
      extended by java.util.AbstractList<E>
          extended by java.util.ArrayList<java.lang.Long>
              extended by core.time.VSVectorTime
All Implemented Interfaces:
VSTime, java.io.Serializable, java.lang.Cloneable, java.lang.Iterable<java.lang.Long>, java.util.Collection<java.lang.Long>, java.util.List<java.lang.Long>, java.util.RandomAccess

public class VSVectorTime
extends java.util.ArrayList<java.lang.Long>
implements VSTime

The class VSVectorTime, defined how the vector timestamps are represented.

Author:
Paul C. Buetow
See Also:
Serialized Form

Field Summary
 
Fields inherited from class java.util.AbstractList
modCount
 
Constructor Summary
VSVectorTime(long globalTime)
          Instantiates a new vector time.
 
Method Summary
 java.lang.Long get(int index)
           
 VSVectorTime getCopy()
          Gets the copy.
 long getGlobalTime()
          Gets the global time.
 void setGlobalTime(long globalTime)
          Sets the global time.
 long[] toLongArray()
          To long array.
 java.lang.String toString()
          Returns a string representation.
 
Methods inherited from class java.util.ArrayList
add, add, addAll, addAll, clear, clone, contains, ensureCapacity, indexOf, isEmpty, lastIndexOf, remove, remove, removeRange, set, size, toArray, toArray, trimToSize
 
Methods inherited from class java.util.AbstractList
equals, hashCode, iterator, listIterator, listIterator, subList
 
Methods inherited from class java.util.AbstractCollection
containsAll, removeAll, retainAll
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.List
containsAll, equals, hashCode, iterator, listIterator, listIterator, removeAll, retainAll, subList
 

Constructor Detail

VSVectorTime

public VSVectorTime(long globalTime)
Instantiates a new vector time.

Parameters:
globalTime - the global time
Method Detail

toLongArray

public long[] toLongArray()
To long array.

Returns:
the long[]

setGlobalTime

public void setGlobalTime(long globalTime)
Sets the global time.

Parameters:
globalTime - the new global time

getGlobalTime

public long getGlobalTime()
Description copied from interface: VSTime
Gets the global time.

Specified by:
getGlobalTime in interface VSTime
Returns:
The global time

getCopy

public VSVectorTime getCopy()
Gets the copy.

Returns:
the copy

toString

public java.lang.String toString()
Description copied from interface: VSTime
Returns a string representation.

Specified by:
toString in interface VSTime
Overrides:
toString in class java.util.AbstractCollection<java.lang.Long>
Returns:
The representation of the implementing object as a string

get

public java.lang.Long get(int index)
Specified by:
get in interface java.util.List<java.lang.Long>
Overrides:
get in class java.util.ArrayList<java.lang.Long>