@Test public void testGetDate() { Date result = position1.getDate(); assertFalse(position2.getDate().equals(result)); }
public Date getDate() { if (this.position instanceof Date) { return (Date) position; } if (this.position instanceof TemporalPosition) { if (this.position instanceof JulianDate) { return Utils.JulianToDate((DefaultJulianDate) position); } if (this.position instanceof DateAndTime) { return Utils.dateAndTimeToDate((DateAndTime) position); } if (this.position instanceof CalendarDate) { return Utils.calendarDateToDate((CalendarDate) position); } if (this.position instanceof TemporalCoordinate) { return Utils.temporalCoordToDate((TemporalCoordinate) position); } if (this.position instanceof OrdinalPosition) { return Utils.ordinalToDate((OrdinalPosition) position); } } return null; }
DefaultPosition implements Position { public Date getDate() { if (this.position instanceof Date) { return (Date) position; } if (this.position instanceof TemporalPosition) { if (this.position instanceof JulianDate) { return Utils.JulianToDate((DefaultJulianDate) position); } if (this.position instanceof DateAndTime) { return Utils.dateAndTimeToDate((DateAndTime) position); } if (this.position instanceof CalendarDate) { return Utils.calendarDateToDate((CalendarDate) position); } if (this.position instanceof TemporalCoordinate) { return Utils.temporalCoordToDate((TemporalCoordinate) position); } if (this.position instanceof OrdinalPosition) { return Utils.ordinalToDate((OrdinalPosition) position); } } return null; } }
DefaultPosition implements Position { public Date getDate() { if (this.position instanceof Date) { return (Date) position; } if (this.position instanceof TemporalPosition) { if (this.position instanceof JulianDate) { return Utils.JulianToDate((DefaultJulianDate) position); } if (this.position instanceof DateAndTime) { return Utils.dateAndTimeToDate((DateAndTime) position); } if (this.position instanceof CalendarDate) { return Utils.calendarDateToDate((CalendarDate) position); } if (this.position instanceof TemporalCoordinate) { return Utils.temporalCoordToDate((TemporalCoordinate) position); } if (this.position instanceof OrdinalPosition) { return Utils.ordinalToDate((OrdinalPosition) position); } } return null; } DefaultPosition(final Date date);  DefaultPosition(final InternationalString datetime);  DefaultPosition(final TemporalPosition anyOther); }
DefaultPosition implements Position { public Date getDate() { if (this.position instanceof Date) { return (Date) position; } if (this.position instanceof TemporalPosition) { if (this.position instanceof JulianDate) { return Utils.JulianToDate((DefaultJulianDate) position); } if (this.position instanceof DateAndTime) { return Utils.dateAndTimeToDate((DateAndTime) position); } if (this.position instanceof CalendarDate) { return Utils.calendarDateToDate((CalendarDate) position); } if (this.position instanceof TemporalCoordinate) { return Utils.temporalCoordToDate((TemporalCoordinate) position); } if (this.position instanceof OrdinalPosition) { return Utils.ordinalToDate((OrdinalPosition) position); } } return null; } DefaultPosition(final Date date);  DefaultPosition(final InternationalString datetime);  DefaultPosition(final TemporalPosition anyOther); TemporalPosition anyOther(); Date getDate(); Time getTime(); InternationalString getDateTime(); @Override boolean equals(final Object object); @Override int hashCode(); @Override String toString(); }
DefaultPosition implements Position { public Date getDate() { if (this.position instanceof Date) { return (Date) position; } if (this.position instanceof TemporalPosition) { if (this.position instanceof JulianDate) { return Utils.JulianToDate((DefaultJulianDate) position); } if (this.position instanceof DateAndTime) { return Utils.dateAndTimeToDate((DateAndTime) position); } if (this.position instanceof CalendarDate) { return Utils.calendarDateToDate((CalendarDate) position); } if (this.position instanceof TemporalCoordinate) { return Utils.temporalCoordToDate((TemporalCoordinate) position); } if (this.position instanceof OrdinalPosition) { return Utils.ordinalToDate((OrdinalPosition) position); } } return null; } DefaultPosition(final Date date);  DefaultPosition(final InternationalString datetime);  DefaultPosition(final TemporalPosition anyOther); TemporalPosition anyOther(); Date getDate(); Time getTime(); InternationalString getDateTime(); @Override boolean equals(final Object object); @Override int hashCode(); @Override String toString();  }