|
Oracle Application Development Framework Model and Business Components Java API Reference
10g Release 3 (10.1.3) B16005-01 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
oracle.jbo.server.java.util.AbstractCollection
oracle.jbo.server.java.util.AbstractSet
This class provides a skeletal implementation of the Set interface to minimize the effort required to implement this interface.
The process of implementing a Set by extending this class is identical to that of implementing a Collection by extending AbstractCollection, except that all of the methods and constructors in subclasses of this class must obey the additional constraints imposed by the Set interface (for instance, the add method must not permit addition of multiple intances of an object to a Set).
Note that this class does not override any of the implementations from abstractCollection. It merely adds implementations for equals and hashCode.
Collection, AbstractCollection, Set| Constructor Summary | |
AbstractSet() |
|
| Method Summary | |
boolean |
equals(java.lang.Object o)Compares the specified Object with this Set for equality. |
int |
hashCode()Returns the hash code value for this Set. |
| Methods inherited from class oracle.jbo.server.java.util.AbstractCollection |
add, addAll, clear, contains, containsAll, isEmpty, iterator, remove, removeAll, retainAll, size, toArray, toString |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface oracle.jbo.server.java.util.Set |
add, addAll, clear, contains, containsAll, isEmpty, iterator, remove, removeAll, retainAll, size, toArray |
| Constructor Detail |
public AbstractSet()
| Method Detail |
public boolean equals(java.lang.Object o)
This implementation first checks if the specified Object is this Set; if so it returns true. Then, it checks if the specified Object is a Set whose size is identical to the size of this Set; if not, it it returns false. If so, it returns containsAll((Collection) o).
equals in interface Seto - Object to be compared for equality with this Set.public int hashCode()
s1.equals(s2) implies that s1.hashCode()==s2.hashCode() for any two Sets s1 and s2, as required by the general contract of Object.hashCode.
This implementation enumerates over the Set, calling hashCode on each element in the Collection, and adding up the results.
hashCode in interface Set
|
Oracle Application Development Framework Model and Business Components Java API Reference
10g Release 3 (10.1.3) B16005-01 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||