Imported GNU Classpath 0.19 + gcj-import-20051115.

* sources.am: Regenerated.
       * Makefile.in: Likewise.
       * scripts/makemake.tcl: Use glob -nocomplain.

From-SVN: r107049
This commit is contained in:
Mark Wielaard 2005-11-15 23:20:01 +00:00
parent 02e549bfaa
commit 8f523f3a10
1241 changed files with 97711 additions and 25284 deletions

View file

@ -914,8 +914,19 @@ public abstract class Calendar implements Serializable, Cloneable
*/
public boolean equals(Object o)
{
return (o instanceof Calendar)
&& getTimeInMillis() == ((Calendar) o).getTimeInMillis();
if (! (o instanceof Calendar))
return false;
Calendar cal = (Calendar) o;
if (getTimeInMillis() == ((Calendar) o).getTimeInMillis()
&& cal.getFirstDayOfWeek() == getFirstDayOfWeek()
&& cal.isLenient() == isLenient()
&& cal.getMinimalDaysInFirstWeek() == getMinimalDaysInFirstWeek())
{
TimeZone self = getTimeZone();
TimeZone oth = cal.getTimeZone();
return self == null ? oth == null : self.equals(oth);
}
return false;
}
/**
@ -926,7 +937,13 @@ public abstract class Calendar implements Serializable, Cloneable
public int hashCode()
{
long time = getTimeInMillis();
return (int) ((time & 0xffffffffL) ^ (time >> 32));
int val = (int) ((time & 0xffffffffL) ^ (time >> 32));
val += (getFirstDayOfWeek() + (isLenient() ? 1230 : 1237)
+ getMinimalDaysInFirstWeek());
TimeZone self = getTimeZone();
if (self != null)
val ^= self.hashCode();
return val;
}
/**