@Test public void testToString() { String result = period1.toString(); assertFalse(period2.toString().equals(result)); }
@Override public String toString() { StringBuilder s = new StringBuilder(); if (begining != null) { s.append("begin:").append(begining); } if (ending != null) { if (s.length() > 0) { s.append(", "); } s.append("end:").append(ending); } return s.insert(0, "Period{").append('}').toString(); }
DefaultPeriod extends DefaultTemporalGeometricPrimitive implements Period { @Override public String toString() { StringBuilder s = new StringBuilder(); if (begining != null) { s.append("begin:").append(begining); } if (ending != null) { if (s.length() > 0) { s.append(", "); } s.append("end:").append(ending); } return s.insert(0, "Period{").append('}').toString(); } }
DefaultPeriod extends DefaultTemporalGeometricPrimitive implements Period { @Override public String toString() { StringBuilder s = new StringBuilder(); if (begining != null) { s.append("begin:").append(begining); } if (ending != null) { if (s.length() > 0) { s.append(", "); } s.append("end:").append(ending); } return s.insert(0, "Period{").append('}').toString(); } DefaultPeriod(Instant begining, Instant ending); }
DefaultPeriod extends DefaultTemporalGeometricPrimitive implements Period { @Override public String toString() { StringBuilder s = new StringBuilder(); if (begining != null) { s.append("begin:").append(begining); } if (ending != null) { if (s.length() > 0) { s.append(", "); } s.append("end:").append(ending); } return s.insert(0, "Period{").append('}').toString(); } DefaultPeriod(Instant begining, Instant ending); Instant getBeginning(); void setBegining(Instant begining); void setBegining(Date date); Instant getEnding(); void setEnding(Instant ending); void setEnding(Date date); @Override boolean equals(final Object object); @Override int hashCode(); @Override String toString(); }
DefaultPeriod extends DefaultTemporalGeometricPrimitive implements Period { @Override public String toString() { StringBuilder s = new StringBuilder(); if (begining != null) { s.append("begin:").append(begining); } if (ending != null) { if (s.length() > 0) { s.append(", "); } s.append("end:").append(ending); } return s.insert(0, "Period{").append('}').toString(); } DefaultPeriod(Instant begining, Instant ending); Instant getBeginning(); void setBegining(Instant begining); void setBegining(Date date); Instant getEnding(); void setEnding(Instant ending); void setEnding(Date date); @Override boolean equals(final Object object); @Override int hashCode(); @Override String toString();  }