OpenConcerto

Dépôt officiel du code source de l'ERP OpenConcerto
sonarqube

svn://code.openconcerto.org/openconcerto

Rev

Rev 174 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 174 Rev 177
Line 221... Line 221...
221
    @Override
221
    @Override
222
    public final C getCollection(final Object key) {
222
    public final C getCollection(final Object key) {
223
        return this.get(key, !this.isEmptyCollSameAsNoColl(), true);
223
        return this.get(key, !this.isEmptyCollSameAsNoColl(), true);
224
    }
224
    }
225
 
225
 
-
 
226
    @Override
-
 
227
    public boolean containsInCollection(K key, V val) throws NullPointerException {
-
 
228
        final C c = this.get(key);
-
 
229
        if (c != null)
-
 
230
            return c.contains(val);
-
 
231
        else if (!this.containsKey(key))
-
 
232
            return false;
-
 
233
        else if (getMode() == Mode.NULL_MEANS_ALL)
-
 
234
            return true;
-
 
235
        else
-
 
236
            throw new NullPointerException("Null value for " + key);
-
 
237
    }
-
 
238
 
226
    /**
239
    /**
227
     * Returns a {@link Collection} view of all the values contained in this map. The collection is
240
     * Returns a {@link Collection} view of all the values contained in this map. The collection is
228
     * backed by the map, so changes to the map are reflected in the collection, and vice-versa. If
241
     * backed by the map, so changes to the map are reflected in the collection, and vice-versa. If
229
     * the map is modified while an iteration over the collection is in progress (except through the
242
     * the map is modified while an iteration over the collection is in progress (except through the
230
     * iterator's own <tt>remove</tt> operation), the results of the iteration are undefined. The
243
     * iterator's own <tt>remove</tt> operation), the results of the iteration are undefined. The
Line 662... Line 675...
662
            return true;
675
            return true;
663
        }
676
        }
664
    }
677
    }
665
 
678
 
666
    @Override
679
    @Override
667
    public CollectionMap2<K, C, V> clone() throws CloneNotSupportedException {
680
    public CollectionMap2<K, C, V> clone() {
668
        @SuppressWarnings("unchecked")
681
        @SuppressWarnings("unchecked")
669
        final CollectionMap2<K, C, V> result = (CollectionMap2<K, C, V>) super.clone();
682
        final CollectionMap2<K, C, V> result = (CollectionMap2<K, C, V>) super.clone();
670
        // allValues has a reference to this
683
        // allValues has a reference to this
671
        result.allValues = null;
684
        result.allValues = null;
672
        // clone each collection value
685
        // clone each collection value