Package gnu.trove.iterator

Examples of gnu.trove.iterator.TLongIterator


    }


    /** {@inheritDoc} */
    public boolean containsAll( TLongCollection collection ) {
        TLongIterator iter = collection.iterator();
        while ( iter.hasNext() ) {
            long element = iter.next();
            if ( ! contains( element ) ) {
                return false;
            }
        }
        return true;
View Full Code Here



    /** {@inheritDoc} */
    public boolean addAll( TLongCollection collection ) {
        boolean changed = false;
        TLongIterator iter = collection.iterator();
        while ( iter.hasNext() ) {
            long element = iter.next();
            if ( add( element ) ) {
                changed = true;
            }
        }
        return changed;
View Full Code Here

    /** {@inheritDoc} */
    @SuppressWarnings({"SuspiciousMethodCalls"})
    public boolean retainAll( Collection<?> collection ) {
        boolean modified = false;
      TLongIterator iter = iterator();
      while ( iter.hasNext() ) {
          if ( ! collection.contains( Long.valueOf ( iter.next() ) ) ) {
            iter.remove();
            modified = true;
          }
      }
      return modified;
    }
View Full Code Here

    public boolean retainAll( TLongCollection collection ) {
        if ( this == collection ) {
            return false;
        }
        boolean modified = false;
      TLongIterator iter = iterator();
      while ( iter.hasNext() ) {
          if ( ! collection.contains( iter.next() ) ) {
            iter.remove();
            modified = true;
          }
      }
      return modified;
    }
View Full Code Here


    /** {@inheritDoc} */
    public boolean removeAll( TLongCollection collection ) {
        boolean changed = false;
        TLongIterator iter = collection.iterator();
        while ( iter.hasNext() ) {
            long element = iter.next();
            if ( remove( element ) ) {
                changed = true;
            }
        }
        return changed;
View Full Code Here

    }

    /** {@inheritDoc} */
    public boolean retainAll(Collection<?> collection) {
        boolean modified = false;
        TLongIterator iter = iterator();
        while (iter.hasNext()) {
            if (!collection.contains(Long.valueOf(iter.next()))) {
                iter.remove();
                modified = true;
            }
        }
        return modified;
    }
View Full Code Here

    }

    /** {@inheritDoc} */
    public boolean retainAll(TLongCollection collection) {
        boolean modified = false;
        TLongIterator iter = iterator();
        while (iter.hasNext()) {
            if (!collection.contains(iter.next())) {
                iter.remove();
                modified = true;
            }
        }
        return modified;
    }
View Full Code Here

    /** {@inheritDoc} */
    public boolean retainAll(long[] array) {
        Arrays.sort(array);

        boolean modified = false;
        TLongIterator iter = iterator();
        while (iter.hasNext()) {
            if (Arrays.binarySearch(array, iter.next()) < 0) {
                iter.remove();
                modified = true;
            }
        }
        return modified;
    }
View Full Code Here

    }

    /** {@inheritDoc} */
    public boolean removeAll(Collection<?> collection) {
        boolean modified = false;
        TLongIterator iter = iterator();
        while (iter.hasNext()) {
            if (collection.contains(Long.valueOf(iter.next()))) {
                iter.remove();
                modified = true;
            }
        }
        return modified;
    }
View Full Code Here

    }

    /** {@inheritDoc} */
    public boolean removeAll(TLongCollection collection) {
        boolean modified = false;
        TLongIterator iter = iterator();
        while (iter.hasNext()) {
            if (collection.contains(iter.next())) {
                iter.remove();
                modified = true;
            }
        }
        return modified;
    }
View Full Code Here

TOP

Related Classes of gnu.trove.iterator.TLongIterator

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.