@Test public void testToString() { String result = instant1.toString(); assertFalse(instant2.toString().equals(result)); }
@Override public String toString() { StringBuilder s = new StringBuilder("Instant:").append('\n'); if (position != null) { s.append("position:").append(position).append('\n'); } if (begunBy != null) { s.append("begunBy:").append(begunBy).append('\n'); } if (endBy != null) { s.append("endBy:").append(endBy).append('\n'); } return s.toString(); }
DefaultInstant extends DefaultTemporalGeometricPrimitive implements Instant { @Override public String toString() { StringBuilder s = new StringBuilder("Instant:").append('\n'); if (position != null) { s.append("position:").append(position).append('\n'); } if (begunBy != null) { s.append("begunBy:").append(begunBy).append('\n'); } if (endBy != null) { s.append("endBy:").append(endBy).append('\n'); } return s.toString(); } }
DefaultInstant extends DefaultTemporalGeometricPrimitive implements Instant { @Override public String toString() { StringBuilder s = new StringBuilder("Instant:").append('\n'); if (position != null) { s.append("position:").append(position).append('\n'); } if (begunBy != null) { s.append("begunBy:").append(begunBy).append('\n'); } if (endBy != null) { s.append("endBy:").append(endBy).append('\n'); } return s.toString(); } DefaultInstant(Position position); }
DefaultInstant extends DefaultTemporalGeometricPrimitive implements Instant { @Override public String toString() { StringBuilder s = new StringBuilder("Instant:").append('\n'); if (position != null) { s.append("position:").append(position).append('\n'); } if (begunBy != null) { s.append("begunBy:").append(begunBy).append('\n'); } if (endBy != null) { s.append("endBy:").append(endBy).append('\n'); } return s.toString(); } 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 String toString() { StringBuilder s = new StringBuilder("Instant:").append('\n'); if (position != null) { s.append("position:").append(position).append('\n'); } if (begunBy != null) { s.append("begunBy:").append(begunBy).append('\n'); } if (endBy != null) { s.append("endBy:").append(endBy).append('\n'); } return s.toString(); } 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();  }