/** * Creates an iterator over the values of the set. * * @return an iterator with support for removals in the underlying set */ public Iterator<Float> iterator() { return new Iterator<Float>() { private final TFloatIterator it = _set.iterator(); public Float next() { return Float.valueOf( it.next() ); } public boolean hasNext() { return it.hasNext(); } public void remove() { it.remove(); } }; }
/** {@inheritDoc} */ public boolean removeAll( TFloatCollection collection ) { if ( collection == this ) { clear(); return true; } boolean changed = false; TFloatIterator iter = collection.iterator(); while ( iter.hasNext() ) { float element = iter.next(); if ( remove( element ) ) { changed = true; } } return changed; }
/** {@inheritDoc} */ public boolean removeAll( TFloatCollection collection ) { if ( this == collection ) { clear(); return true; } boolean changed = false; TFloatIterator iter = collection.iterator(); while ( iter.hasNext() ) { float 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; TFloatLinkedList that = (TFloatLinkedList) o; if (no_entry_value != that.no_entry_value) return false; if (size != that.size) return false; TFloatIterator iterator = iterator(); TFloatIterator thatIterator = that.iterator(); while (iterator.hasNext()) { if (!thatIterator.hasNext()) return false; if (iterator.next() != thatIterator.next()) return false; } return true; }
/** {@inheritDoc} */ public boolean retainAll( TFloatCollection collection ) { if ( this == collection ) { return false; } boolean modified = false; TFloatIterator iter = iterator(); while ( iter.hasNext() ) { if ( ! collection.contains( iter.next() ) ) { iter.remove(); modified = true; } } return modified; }
/** {@inheritDoc} */ public boolean retainAll( Collection<?> collection ) { boolean modified = false; TFloatIterator iter = iterator(); while ( iter.hasNext() ) { //noinspection SuspiciousMethodCalls if ( ! collection.contains( Float.valueOf ( iter.next() ) ) ) { iter.remove(); modified = true; } } return modified; }
/** {@inheritDoc} */ public boolean containsAll(TFloatCollection collection) { if (isEmpty()) return false; for (TFloatIterator it = collection.iterator(); it.hasNext();) { float i = it.next(); if (!(contains(i))) return false; } return true; }
/** {@inheritDoc} */ public boolean containsAll( TFloatCollection collection ) { TFloatIterator iter = collection.iterator(); while ( iter.hasNext() ) { if ( ! TObjectFloatHashMap.this.containsValue( iter.next() ) ) { return false; } } return true; }
/** {@inheritDoc} */ public boolean containsAll( TFloatCollection collection ) { TFloatIterator iter = collection.iterator(); while ( iter.hasNext() ) { if ( ! TObjectFloatCustomHashMap.this.containsValue( iter.next() ) ) { return false; } } return true; }
/** {@inheritDoc} */ public boolean containsAll( TFloatCollection collection ) { TFloatIterator iter = collection.iterator(); while ( iter.hasNext() ) { float element = iter.next(); if ( ! contains( element ) ) { return false; } } return true; }
/** {@inheritDoc} */ public boolean addAll( TFloatCollection collection ) { boolean changed = false; TFloatIterator iter = collection.iterator(); while ( iter.hasNext() ) { float element = iter.next(); if ( add( element ) ) { changed = true; } } return changed; }
/** {@inheritDoc} */ @SuppressWarnings({"SuspiciousMethodCalls"}) public boolean retainAll( Collection<?> collection ) { boolean modified = false; TFloatIterator iter = iterator(); while ( iter.hasNext() ) { if ( ! collection.contains( Float.valueOf ( iter.next() ) ) ) { iter.remove(); modified = true; } } return modified; }
/** {@inheritDoc} */ public boolean removeAll( TFloatCollection collection ) { boolean changed = false; TFloatIterator iter = collection.iterator(); while ( iter.hasNext() ) { float element = iter.next(); if ( remove( element ) ) { changed = true; } } return changed; }
@Override public String toString() { final StringBuilder buf = new StringBuilder("{"); TFloatIterator it = iterator(); while (it.hasNext()) { float next = it.next(); buf.append(next); if (it.hasNext()) buf.append(", "); } buf.append("}"); return buf.toString(); }
/** {@inheritDoc} */ public boolean containsAll( TFloatCollection collection ) { if ( this == collection ) { return true; } TFloatIterator iter = collection.iterator(); while ( iter.hasNext() ) { float element = iter.next(); if ( ! contains( element ) ) { return false; } } return true; }
/** {@inheritDoc} */ public boolean retainAll(TFloatCollection collection) { boolean modified = false; TFloatIterator iter = iterator(); while (iter.hasNext()) { if (!collection.contains(iter.next())) { iter.remove(); modified = true; } } return modified; }
public TFloatLinkedList(TFloatList list) { no_entry_value = list.getNoEntryValue(); // for (TFloatIterator iterator = list.iterator(); iterator.hasNext();) { float next = iterator.next(); add(next); } }
/** {@inheritDoc} */ public boolean addAll(TFloatCollection collection) { boolean ret = false; for (TFloatIterator it = collection.iterator(); it.hasNext();) { float i = it.next(); if (add(i)) ret = true; } return ret; }
/** {@inheritDoc} */ public boolean retainAll(Collection<?> collection) { boolean modified = false; TFloatIterator iter = iterator(); while (iter.hasNext()) { if (!collection.contains(Float.valueOf(iter.next()))) { iter.remove(); modified = true; } } return modified; }
/** {@inheritDoc} */ public boolean removeAll(Collection<?> collection) { boolean modified = false; TFloatIterator iter = iterator(); while (iter.hasNext()) { if (collection.contains(Float.valueOf(iter.next()))) { iter.remove(); modified = true; } } return modified; }