/** * Removes all this collection's elements that are also contained in the * specified collection * * @param c the collection to remove * @return true if the collection changed */ @Override public boolean removeAll(Collection<?> c) { boolean result; Iterator<?> iter; result = false; iter = c.iterator(); while (iter.hasNext()) { result = remove(iter.next()) || result; } m_RecalcHashCode = result; return result; }
/** * Removes all this collection's elements that are also contained in the * specified collection * * @param c the collection to remove * @return true if the collection changed */ @Override public boolean removeAll(Collection<?> c) { boolean result; Iterator<?> iter; result = false; iter = c.iterator(); while (iter.hasNext()) { result = remove(iter.next()) || result; } m_RecalcHashCode = result; return result; }
/** * Retains only the elements in this collection that are contained in the * specified collection * * @param c the collection to use as reference * @return true if this collection changed as a result of the call */ @Override public boolean retainAll(Collection<?> c) { boolean result; Iterator<?> iter; Object o; result = false; iter = iterator(); while (iter.hasNext()) { o = iter.next(); if (!c.contains(o)) { result = remove(o) || result; } } m_RecalcHashCode = result; return result; }
/** * Retains only the elements in this collection that are contained in the * specified collection * * @param c the collection to use as reference * @return true if this collection changed as a result of the call */ @Override public boolean retainAll(Collection<?> c) { boolean result; Iterator<?> iter; Object o; result = false; iter = iterator(); while (iter.hasNext()) { o = iter.next(); if (!c.contains(o)) { result = remove(o) || result; } } m_RecalcHashCode = result; return result; }