SimpleXTime implements XTime<F> { @Override public final int hashCode() { LOGGER.trace("begin {}.hashCode()", getClass().getSimpleName()); final int rval = new HashCodeBuilder() .append(_tick) .append(_phase) .toHashCode(); LOGGER.trace("will return: {}", rval); LOGGER.trace("end {}.hashCode()", getClass().getSimpleName()); return rval; } SimpleXTime(
            final long tick,
            final F phase); @Override final long getTick(); @Override final F getPhase(); @Override final int compareTo(
            final XTime<F> other); @Override final boolean equals(
            final Object obj); @Override final int hashCode(); @Override final String toString();  }
@Test public final void hashCodeIdentical() { final SimpleXTime<PhaseImpl> time = new SimpleXTime<PhaseImpl>(1, PhaseImpl.PHASE_1); assertThat(time.hashCode(), is(time.hashCode())); }
@Test public final void hashCodeSameTime() { final SimpleXTime<PhaseImpl> time = new SimpleXTime<PhaseImpl>(1, PhaseImpl.PHASE_1); final SimpleXTime<PhaseImpl> sameTime = new SimpleXTime<PhaseImpl>(1, PhaseImpl.PHASE_1); assertThat(time.hashCode(), is(sameTime.hashCode())); }