Package org.mpi_sws.jmc.util
Class LamportVectorClock.Component
java.lang.Object
org.mpi_sws.jmc.util.LamportVectorClock.Component
- All Implemented Interfaces:
TotalOrder<LamportVectorClock.Component>
- Enclosing class:
LamportVectorClock
public static class LamportVectorClock.Component
extends Object
implements TotalOrder<LamportVectorClock.Component>
Represents a component of the Lamport vector clock.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.mpi_sws.jmc.util.TotalOrder
TotalOrder.InvalidComparisonException, TotalOrder.Relation -
Constructor Summary
ConstructorsConstructorDescriptionComponent(int index, LamportVectorClock clock) Constructs a newLamportVectorClock.Componentwith the given index and vector clock. -
Method Summary
Modifier and TypeMethodDescriptionCompares two objects of type T - the current and the other passed as argument.
-
Constructor Details
-
Component
Constructs a newLamportVectorClock.Componentwith the given index and vector clock.- Parameters:
index- The index of the component.clock- The vector clock.
-
-
Method Details
-
compare
public TotalOrder.Relation compare(LamportVectorClock.Component other) throws TotalOrder.InvalidComparisonException Description copied from interface:TotalOrderCompares two objects of type T - the current and the other passed as argument.- Specified by:
comparein interfaceTotalOrder<LamportVectorClock.Component>- Parameters:
other- the other object to compare to- Returns:
- The relation between the two objects.
- Throws:
TotalOrder.InvalidComparisonException
-