/** * Return TRUE if <code>x</code> and <code>y</code> represent the same set of key/value pairs. * * @param y * @return boolean */ public boolean objectEqualP(Stella_Object y) { { StellaHashTable x = this; if (Surrogate.subtypeOfP( Stella_Object.safePrimaryType(y), Stella.SGT_STELLA_STELLA_HASH_TABLE)) { { StellaHashTable y000 = ((StellaHashTable) (y)); if (x.length() == y000.length()) { { Stella_Object key = null; Stella_Object value = null; StellaHashTableIterator iter000 = ((StellaHashTableIterator) (x.allocateIterator())); while (iter000.nextP()) { key = iter000.key; value = iter000.value; if (!Stella_Object.equalP(value, y000.lookup(key))) { return (false); } } } return (true); } } } else { } return (false); } }
public boolean lessP(Stella_Object t2) { { CalendarDate t1 = this; if (Surrogate.subtypeOfP( Stella_Object.safePrimaryType(t2), Stella.SGT_STELLA_CALENDAR_DATE)) { { CalendarDate t2000 = ((CalendarDate) (t2)); if (t1.modifiedJulianDay == t2000.modifiedJulianDay) { return (t1.timeMillis < t2000.timeMillis); } else { return (t1.modifiedJulianDay < t2000.modifiedJulianDay); } } } else { { OutputStringStream stream000 = OutputStringStream.newOutputStringStream(); stream000.nativeStream.print( "Can't compare calendar date `" + t1 + "' with object `" + t2 + "'"); throw ((IncompatibleQuantityException) (IncompatibleQuantityException.newIncompatibleQuantityException( stream000.theStringReader()) .fillInStackTrace())); } } } }
public boolean objectEqlP(Stella_Object t2) { { CalendarDate t1 = this; if (Surrogate.subtypeOfP( Stella_Object.safePrimaryType(t2), Stella.SGT_STELLA_CALENDAR_DATE)) { { CalendarDate t2000 = ((CalendarDate) (t2)); if (t1.modifiedJulianDay == t2000.modifiedJulianDay) { return (t1.timeMillis == t2000.timeMillis); } else { return (t1.modifiedJulianDay == t2000.modifiedJulianDay); } } } else { return (false); } } }
public Quantity coerceTo(Stella_Object y) { { CalendarDate x = this; if (Surrogate.subtypeOfP(Stella_Object.safePrimaryType(y), Stella.SGT_STELLA_CALENDAR_DATE)) { { CalendarDate y000 = ((CalendarDate) (y)); return (y000); } } else { { OutputStringStream stream000 = OutputStringStream.newOutputStringStream(); stream000.nativeStream.print("Can't coerce `" + y + "' to a CALENDAR-DATE"); throw ((IncompatibleQuantityException) (IncompatibleQuantityException.newIncompatibleQuantityException( stream000.theStringReader()) .fillInStackTrace())); } } } }