home *** CD-ROM | disk | FTP | other *** search
- /* Copyright (c) IBM Corp. 1992 */
- template < class Element >
- Boolean IAEqualityCollection < Element >::
- isContained (Element const& element, void* env) {
- return (*(IAEqualityCollection < Element >**) env)->contains (element);
- }
-
- template < class Element >
- Boolean IAEqualityCollection < Element >::
- isNotContained (Element const& element, void* env) {
- return ! (*(IAEqualityCollection < Element >**) env)->contains (element);
- }
-
- template <class Element>
- Boolean IAEqualityCollection < Element >::
- containsAllFrom (IACollection < Element > const& collection) const {
- Boolean result = True;
- ICursor *cursor = collection.newCursor ();
- forCursor (*cursor) {
- if (! contains (collection.elementAt (*cursor))) {
- result = False;
- break;
- }
- }
- delete cursor;
- return result;
- };
-