Code example for CopyOnWriteArrayList

Methods: removeAll

0
            mDictionaries.removeAll(Collections.singleton(null));
        } 
    } 
 
    public DictionaryCollection(Collection<Dictionary> dictionaries) {
        mDictionaries = new CopyOnWriteArrayList<Dictionary>(dictionaries);
        mDictionaries.removeAll(Collections.singleton(null));
    } 
 
    @Override 
    public void getWords(final WordComposer composer, final CharSequence prevWordForBigrams,
            final WordCallback callback, final ProximityInfo proximityInfo) {
        for (final Dictionary dict : mDictionaries)
            dict.getWords(composer, prevWordForBigrams, callback, proximityInfo);
    } 
 
    @Override 
    public void getBigrams(final WordComposer composer, final CharSequence previousWord,
            final WordCallback callback) {
        for (final Dictionary dict : mDictionaries)
            dict.getBigrams(composer, previousWord, callback);