@Test public void testHashCode() { int result = instant1.hashCode(); assertFalse(instant2.hashCode() == result); }
@Override public int hashCode() { int hash = 5; hash = 37 * hash + (this.position != null ? this.position.hashCode() : 0); hash = 37 * hash + (this.begunBy != null ? this.begunBy.hashCode() : 0); hash = 37 * hash + (this.endBy != null ? this.endBy.hashCode() : 0); return hash; }
DefaultInstant extends DefaultTemporalGeometricPrimitive implements Instant { @Override public int hashCode() { int hash = 5; hash = 37 * hash + (this.position != null ? this.position.hashCode() : 0); hash = 37 * hash + (this.begunBy != null ? this.begunBy.hashCode() : 0); hash = 37 * hash + (this.endBy != null ? this.endBy.hashCode() : 0); return hash; } }
DefaultInstant extends DefaultTemporalGeometricPrimitive implements Instant { @Override public int hashCode() { int hash = 5; hash = 37 * hash + (this.position != null ? this.position.hashCode() : 0); hash = 37 * hash + (this.begunBy != null ? this.begunBy.hashCode() : 0); hash = 37 * hash + (this.endBy != null ? this.endBy.hashCode() : 0); return hash; } DefaultInstant(Position position); }
DefaultInstant extends DefaultTemporalGeometricPrimitive implements Instant { @Override public int hashCode() { int hash = 5; hash = 37 * hash + (this.position != null ? this.position.hashCode() : 0); hash = 37 * hash + (this.begunBy != null ? this.begunBy.hashCode() : 0); hash = 37 * hash + (this.endBy != null ? this.endBy.hashCode() : 0); return hash; } DefaultInstant(Position position); Position getPosition(); Collection<Period> getBegunBy(); Collection<Period> getEndedBy(); void setPosition(Position position); void setBegunBy(Collection<Period> begunBy); void setEndBy(Collection<Period> endBy); @Override boolean equals(final Object object); @Override int hashCode(); @Override String toString(); }
DefaultInstant extends DefaultTemporalGeometricPrimitive implements Instant { @Override public int hashCode() { int hash = 5; hash = 37 * hash + (this.position != null ? this.position.hashCode() : 0); hash = 37 * hash + (this.begunBy != null ? this.begunBy.hashCode() : 0); hash = 37 * hash + (this.endBy != null ? this.endBy.hashCode() : 0); return hash; } DefaultInstant(Position position); Position getPosition(); Collection<Period> getBegunBy(); Collection<Period> getEndedBy(); void setPosition(Position position); void setBegunBy(Collection<Period> begunBy); void setEndBy(Collection<Period> endBy); @Override boolean equals(final Object object); @Override int hashCode(); @Override String toString();  }