@Override public boolean equals(final Object object) { if (object == this) { return true; } if (object instanceof DefaultOrdinalPosition && super.equals(object)) { final DefaultOrdinalPosition that = (DefaultOrdinalPosition) object; return Utilities.equals(this.ordinalPosition, that.ordinalPosition); } return false; }
@Override public int hashCode() { int hash = super.hashCode(); hash = 37 * hash + (this.coordinateValue != null ? this.coordinateValue.hashCode() : 0); return hash; }
/** Test of setFrame method, of class DefaultTemporalPosition. */ @Test public void testSetFrame() { TemporalReferenceSystem result = ((DefaultTemporalPosition) temporalPosition1).getFrame(); NamedIdentifier name = new NamedIdentifier(Citations.CRS, "Babylonian calendar"); ((DefaultTemporalPosition) temporalPosition1) .setFrame(new DefaultTemporalReferenceSystem(name, null)); assertFalse(((DefaultTemporalPosition) temporalPosition1).getFrame().equals(result)); }
@Before public void setUp() { NamedIdentifier name1 = new NamedIdentifier(Citations.CRS, "Gregorian calendar"); NamedIdentifier name2 = new NamedIdentifier(Citations.CRS, "Julian calendar"); TemporalReferenceSystem frame1 = new DefaultTemporalReferenceSystem(name1, null); TemporalReferenceSystem frame2 = new DefaultTemporalReferenceSystem(name2, null); temporalPosition1 = new DefaultTemporalPosition(frame1, IndeterminateValue.UNKNOWN); temporalPosition2 = new DefaultTemporalPosition(frame2, IndeterminateValue.NOW); }
/** Test of setIndeterminatePosition method, of class DefaultTemporalPosition. */ @Test public void testSetIndeterminatePosition() { IndeterminateValue result = temporalPosition1.getIndeterminatePosition(); ((DefaultTemporalPosition) temporalPosition1) .setIndeterminatePosition(IndeterminateValue.BEFORE); assertFalse(temporalPosition1.getIndeterminatePosition().equals(result)); }
@Override public boolean equals(final Object object) { if (object == this) { return true; } if (object instanceof DefaultTemporalCoordinate && super.equals(object)) { final DefaultTemporalCoordinate that = (DefaultTemporalCoordinate) object; return Utilities.equals(this.coordinateValue, that.coordinateValue); } return false; }
&& ((Instant) other).getPosition().anyOther() != null) { if (!((DefaultTemporalPosition) ((Instant) this).getPosition().anyOther()) .getFrame() .equals( ((DefaultTemporalPosition) ((Instant) other).getPosition().anyOther()) .getFrame())) { try { throw new Exception( if (((Instant) this).getPosition().anyOther().getIndeterminatePosition() != null || ((DefaultTemporalPosition) ((Instant) this).getPosition().anyOther()) .getFrame() instanceof OrdinalReferenceSystem) { try { if (((Instant) other).getPosition().anyOther().getIndeterminatePosition() != null || ((DefaultTemporalPosition) ((Instant) other).getPosition().anyOther()) .getFrame() instanceof OrdinalReferenceSystem) { try {
@Override public int hashCode() { int hash = super.hashCode(); hash = 37 * hash + (this.coordinateValue != null ? this.coordinateValue.hashCode() : 0); return hash; }
@Override public boolean equals(final Object object) { if (object == this) { return true; } if (object instanceof DefaultClockTime && super.equals(object)) { final DefaultClockTime that = (DefaultClockTime) object; return Utilities.equals(this.clockTime, that.clockTime); } return false; }
if (!((DefaultTemporalPosition) ((Instant) this).getPosition().anyOther()).getFrame().equals(((DefaultTemporalPosition) ((Instant) other).getPosition().anyOther()).getFrame())) { try { throw new Exception("the TM_TemporalPositions are not both associated with the same TM_ReferenceSystem !"); ((DefaultTemporalPosition) ((Instant) this).getPosition().anyOther()).getFrame() instanceof OrdinalReferenceSystem) { try { throw new Exception("either of the two TM_TemporalPositions is indeterminate or is associated with a TM_OrdianlReferenceSystem !"); ((DefaultTemporalPosition) ((Instant) other).getPosition().anyOther()).getFrame() instanceof OrdinalReferenceSystem) { try { throw new Exception("either of the two TM_TemporalPositions is indeterminate or is associated with a TM_OrdianlReferenceSystem !");
@Override public int hashCode() { int hash = super.hashCode(); hash = 37 * hash + (this.coordinateValue != null ? this.coordinateValue.hashCode() : 0); return hash; }
@Override public boolean equals(final Object object) { if (object == this) { return true; } if (object instanceof DefaultCalendarDate && super.equals(object)) { final DefaultCalendarDate that = (DefaultCalendarDate) object; return Utilities.equals(this.calendarDate, that.calendarDate) && Utilities.equals(this.calendarEraName, that.calendarEraName); } return false; }
if (!((DefaultTemporalPosition) ((Instant) this).getPosition().anyOther()).getFrame().equals(((DefaultTemporalPosition) ((Instant) other).getPosition().anyOther()).getFrame())) { try { throw new Exception("the TM_TemporalPositions are not both associated with the same TM_ReferenceSystem !"); ((DefaultTemporalPosition) ((Instant) this).getPosition().anyOther()).getFrame() instanceof OrdinalReferenceSystem) { try { throw new Exception("either of the two TM_TemporalPositions is indeterminate or is associated with a TM_OrdianlReferenceSystem !"); ((DefaultTemporalPosition) ((Instant) other).getPosition().anyOther()).getFrame() instanceof OrdinalReferenceSystem) { try { throw new Exception("either of the two TM_TemporalPositions is indeterminate or is associated with a TM_OrdianlReferenceSystem !");
@Override public boolean equals(final Object object) { if (object == this) { return true; } if (object instanceof DefaultDateAndTime && super.equals(object)) { final DefaultDateAndTime that = (DefaultDateAndTime) object; return Utilities.equals(this.calendarDate, that.calendarDate) && Utilities.equals(this.calendarEraName, that.calendarEraName) && Utilities.equals(this.clockTime, that.clockTime); } return false; }
@Override public boolean equals(final Object object) { if (object == this) { return true; } if (object instanceof DefaultClockTime && super.equals(object)) { final DefaultClockTime that = (DefaultClockTime) object; return Utilities.equals(this.clockTime, that.clockTime); } return false; }
@Override public boolean equals(final Object object) { if (object == this) { return true; } if (object instanceof DefaultClockTime && super.equals(object)) { final DefaultClockTime that = (DefaultClockTime) object; return Utilities.equals(this.clockTime, that.clockTime); } return false; }
@Override public boolean equals(final Object object) { if (object == this) { return true; } if (object instanceof DefaultOrdinalPosition && super.equals(object)) { final DefaultOrdinalPosition that = (DefaultOrdinalPosition) object; return Utilities.equals(this.ordinalPosition, that.ordinalPosition); } return false; }
@Override public boolean equals(final Object object) { if (object == this) { return true; } if (object instanceof DefaultOrdinalPosition && super.equals(object)) { final DefaultOrdinalPosition that = (DefaultOrdinalPosition) object; return Utilities.equals(this.ordinalPosition, that.ordinalPosition); } return false; }
@Override public boolean equals(final Object object) { if (object == this) { return true; } if (object instanceof DefaultTemporalCoordinate && super.equals(object)) { final DefaultTemporalCoordinate that = (DefaultTemporalCoordinate) object; return Utilities.equals(this.coordinateValue, that.coordinateValue); } return false; }