@Test public void testAdd() throws Exception { Timestamp t = new Timestamp(); short l = (short) rand.nextInt(100); t.setLogical((short)l); long wt = t.getWallTime(); int wtIncrement = rand.nextInt(100); short logicalIncrement = (short)rand.nextInt(100); Timestamp tNew = t.add(wtIncrement, logicalIncrement); assertTrue(tNew.getLogical() == l + logicalIncrement); assertTrue(tNew.getWallTime() == wt + wtIncrement); }
public Timestamp add(Timestamp t) { return new Timestamp(this.wallTime + t.wallTime, (short)(this.logical + t.logical)); }
Timestamp implements Comparable<Timestamp>, Cloneable { public Timestamp add(Timestamp t) { return new Timestamp(this.wallTime + t.wallTime, (short)(this.logical + t.logical)); } }
Timestamp implements Comparable<Timestamp>, Cloneable { public Timestamp add(Timestamp t) { return new Timestamp(this.wallTime + t.wallTime, (short)(this.logical + t.logical)); } Timestamp();  Timestamp(long wallTime, short logical);  Timestamp(long t); }
Timestamp implements Comparable<Timestamp>, Cloneable { public Timestamp add(Timestamp t) { return new Timestamp(this.wallTime + t.wallTime, (short)(this.logical + t.logical)); } Timestamp();  Timestamp(long wallTime, short logical);  Timestamp(long t); Timestamp clone(); Timestamp add(Timestamp t); Timestamp add(long wallTime, short logical); long getWallTime(); void setWallTime(long wallTime); short getLogical(); void setLogical(short logical); void incrementLogical(); void resetLogical(); long toLong(); int compareTo(Timestamp o); String toString(); }
Timestamp implements Comparable<Timestamp>, Cloneable { public Timestamp add(Timestamp t) { return new Timestamp(this.wallTime + t.wallTime, (short)(this.logical + t.logical)); } Timestamp();  Timestamp(long wallTime, short logical);  Timestamp(long t); Timestamp clone(); Timestamp add(Timestamp t); Timestamp add(long wallTime, short logical); long getWallTime(); void setWallTime(long wallTime); short getLogical(); void setLogical(short logical); void incrementLogical(); void resetLogical(); long toLong(); int compareTo(Timestamp o); String toString();  }