blob: 2a91c47668be06b3ce9cab06e989083349ada0cc (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
|
package java.util;
public abstract class AbstractSet
extends AbstractCollection
implements Set
{
protected AbstractSet()
{
}
public boolean equals(Object o)
{
if (this == o)
{
return true;
}
if (o == null)
{
return false;
}
if (!(o instanceof Set))
{
return false;
}
if (((Set)o).size() != size())
{
return false;
}
return containsAll((Collection)o);
}
public int hashCode()
{
int hashCode = 0;
Iterator it = iterator();
while (it.hasNext())
{
Object o = it.next();
if (o != null)
{
hashCode += o.hashCode();
}
}
return hashCode;
}
}
|