|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.util.AbstractCollection | +--java.util.AbstractSet
Constructor Summary | |
protected |
AbstractSet()
|
Method Summary | |
boolean |
equals(Object)
Determines if this object is "equal" to another object. |
int |
hashCode()
|
boolean |
removeAll(Collection)
|
Methods inherited from class java.util.AbstractCollection |
add, addAll, clear, contains, containsAll, isEmpty, iterator, remove, retainAll, size, toArray, toArray, toString |
Methods inherited from interface java.util.Set |
add, contains, iterator, remove, size |
Constructor Detail |
protected AbstractSet()
Method Detail |
public boolean equals(Object)
Object
In general, objects should be instances of the same class
with the same guts to be considered equal. For example,
the code below only prints same value since
s
and t
are different strings though
they have the same value: "hello".
String s = new String("hello"); String t = new String("hello"); if (s.equals(t)) System.out.println("same value"); if (s == t) System.out.println("same string");
equals
in interface Collection
equals
in class Object
java.lang.Object
is
- the other Object to which this one is comparedother
public int hashCode()
hashCode
in interface Collection
hashCode
in class Object
public boolean removeAll(Collection)
removeAll
in interface Collection
removeAll
in class AbstractCollection
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |