/** {@inheritDoc} */ public boolean removeAll( TDoubleCollection collection ) { if ( collection == this ) { clear(); return true; } boolean changed = false; TDoubleIterator iter = collection.iterator(); while ( iter.hasNext() ) { double element = iter.next(); if ( remove( element ) ) { changed = true; } } return changed; }
/** {@inheritDoc} */ public boolean removeAll( TDoubleCollection collection ) { if ( this == collection ) { clear(); return true; } boolean changed = false; TDoubleIterator iter = collection.iterator(); while ( iter.hasNext() ) { double element = iter.next(); if ( remove( element ) ) { changed = true; } } return changed; }
@Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; TDoubleLinkedList that = (TDoubleLinkedList) o; if (no_entry_value != that.no_entry_value) return false; if (size != that.size) return false; TDoubleIterator iterator = iterator(); TDoubleIterator thatIterator = that.iterator(); while (iterator.hasNext()) { if (!thatIterator.hasNext()) return false; if (iterator.next() != thatIterator.next()) return false; } return true; }
/** * Creates an iterator over the values of the set. * * @return an iterator with support for removals in the underlying set */ public Iterator<Double> iterator() { return new Iterator<Double>() { private final TDoubleIterator it = _set.iterator(); public Double next() { return Double.valueOf( it.next() ); } public boolean hasNext() { return it.hasNext(); } public void remove() { it.remove(); } }; }
/** {@inheritDoc} */ public boolean containsAll( TDoubleCollection collection ) { if ( collection == this ) { return true; } TDoubleIterator iter = collection.iterator(); while ( iter.hasNext() ) { if ( ! TDoubleObjectHashMap.this.containsKey( iter.next() ) ) { return false; } } return true; }
/** {@inheritDoc} */ public boolean retainAll( Collection<?> collection ) { boolean modified = false; TDoubleIterator iter = iterator(); while ( iter.hasNext() ) { //noinspection SuspiciousMethodCalls if ( ! collection.contains( Double.valueOf ( iter.next() ) ) ) { iter.remove(); modified = true; } } return modified; }
/** {@inheritDoc} */ public boolean containsAll( TDoubleCollection collection ) { TDoubleIterator iter = collection.iterator(); while ( iter.hasNext() ) { if ( ! TObjectDoubleHashMap.this.containsValue( iter.next() ) ) { return false; } } return true; }
/** {@inheritDoc} */ @SuppressWarnings({"SuspiciousMethodCalls"}) public boolean retainAll( Collection<?> collection ) { boolean modified = false; TDoubleIterator iter = iterator(); while ( iter.hasNext() ) { if ( ! collection.contains( Double.valueOf ( iter.next() ) ) ) { iter.remove(); modified = true; } } return modified; }
/** {@inheritDoc} */ public boolean retainAll( TDoubleCollection collection ) { if ( this == collection ) { return false; } boolean modified = false; TDoubleIterator iter = iterator(); while ( iter.hasNext() ) { if ( ! collection.contains( iter.next() ) ) { iter.remove(); modified = true; } } return modified; }
/** {@inheritDoc} */ public boolean containsAll( TDoubleCollection collection ) { TDoubleIterator iter = collection.iterator(); while ( iter.hasNext() ) { if ( ! TObjectDoubleCustomHashMap.this.containsValue( iter.next() ) ) { return false; } } return true; }
/** {@inheritDoc} */ public boolean containsAll( TDoubleCollection collection ) { TDoubleIterator iter = collection.iterator(); while ( iter.hasNext() ) { double element = iter.next(); if ( ! contains( element ) ) { return false; } } return true; }
/** {@inheritDoc} */ public boolean addAll( TDoubleCollection collection ) { boolean changed = false; TDoubleIterator iter = collection.iterator(); while ( iter.hasNext() ) { double element = iter.next(); if ( add( element ) ) { changed = true; } } return changed; }
/** {@inheritDoc} */ public boolean containsAll( TDoubleCollection collection ) { if ( this == collection ) { return true; } TDoubleIterator iter = collection.iterator(); while ( iter.hasNext() ) { double element = iter.next(); if ( ! contains( element ) ) { return false; } } return true; }
/** {@inheritDoc} */ public boolean removeAll( TDoubleCollection collection ) { boolean changed = false; TDoubleIterator iter = collection.iterator(); while ( iter.hasNext() ) { double element = iter.next(); if ( remove( element ) ) { changed = true; } } return changed; }
/** {@inheritDoc} */ public boolean containsAll(TDoubleCollection collection) { if (isEmpty()) return false; for (TDoubleIterator it = collection.iterator(); it.hasNext();) { double i = it.next(); if (!(contains(i))) return false; } return true; }
/** {@inheritDoc} */ public boolean addAll(TDoubleCollection collection) { boolean ret = false; for (TDoubleIterator it = collection.iterator(); it.hasNext();) { double i = it.next(); if (add(i)) ret = true; } return ret; }
/** {@inheritDoc} */ public boolean retainAll(Collection<?> collection) { boolean modified = false; TDoubleIterator iter = iterator(); while (iter.hasNext()) { if (!collection.contains(Double.valueOf(iter.next()))) { iter.remove(); modified = true; } } return modified; }
/** {@inheritDoc} */ public boolean retainAll(double[] array) { Arrays.sort(array); boolean modified = false; TDoubleIterator iter = iterator(); while (iter.hasNext()) { if (Arrays.binarySearch(array, iter.next()) < 0) { iter.remove(); modified = true; } } return modified; }
/** {@inheritDoc} */ public boolean removeAll(Collection<?> collection) { boolean modified = false; TDoubleIterator iter = iterator(); while (iter.hasNext()) { if (collection.contains(Double.valueOf(iter.next()))) { iter.remove(); modified = true; } } return modified; }
/** {@inheritDoc} */ public boolean retainAll(TDoubleCollection collection) { boolean modified = false; TDoubleIterator iter = iterator(); while (iter.hasNext()) { if (!collection.contains(iter.next())) { iter.remove(); modified = true; } } return modified; }