package clocks; import java.util.*; public class VectorClock { public int[] v; int myId; int N; public VectorClock(int numProc, int id) { myId = id; N = numProc; v = new int[numProc]; Arrays.fill(v,0); v[myId] = 1; } public VectorClock(VectorClock vc) { myId = vc.myId; N = vc.N; v = new int[N]; for(int i=0;ivc.v[i]) return false; } return true; } public boolean isGreaterThan(VectorClock vc){ return vc.isLessThan(this); } public boolean isIncomparableWith(VectorClock vc){ return (!isLessThan(vc) && !isGreaterThan(vc)); } }