Java 类gnu.trove.iterator.TShortIterator 实例源码

项目:xcc    文件:TShortObjectHashMap.java   
/** {@inheritDoc} */
public boolean removeAll( TShortCollection collection ) {
    if ( collection == this ) {
        clear();
        return true;
    }
    boolean changed = false;
    TShortIterator iter = collection.iterator();
    while ( iter.hasNext() ) {
        short element = iter.next();
        if ( remove( element ) ) {
            changed = true;
        }
    }
    return changed;
}
项目:xcc    文件:TObjectShortCustomHashMap.java   
/** {@inheritDoc} */
public boolean removeAll( TShortCollection collection ) {
    if ( this == collection ) {
        clear();
        return true;
    }
    boolean changed = false;
    TShortIterator iter = collection.iterator();
    while ( iter.hasNext() ) {
        short element = iter.next();
        if ( remove( element ) ) {
            changed = true;
        }
    }
    return changed;
}
项目:HCFCore    文件:TShortArrayList.java   
/** {@inheritDoc} */
public boolean removeAll( TShortCollection collection ) {
    if ( collection == this ) {
        clear();
        return true;
    }
    boolean changed = false;
    TShortIterator iter = collection.iterator();
    while ( iter.hasNext() ) {
        short element = iter.next();
        if ( remove( element ) ) {
            changed = true;
        }
    }
    return changed;
}
项目:xcc    文件:TShortLinkedList.java   
@Override
public boolean equals(Object o) {
    if (this == o) return true;
    if (o == null || getClass() != o.getClass()) return false;

    TShortLinkedList that = (TShortLinkedList) o;

    if (no_entry_value != that.no_entry_value) return false;
    if (size != that.size) return false;

    TShortIterator iterator = iterator();
    TShortIterator thatIterator = that.iterator();
    while (iterator.hasNext()) {
        if (!thatIterator.hasNext())
            return false;

        if (iterator.next() != thatIterator.next())
            return false;
    }

    return true;
}
项目:xcc    文件:TShortSetDecorator.java   
/**
 * Creates an iterator over the values of the set.
 *
 * @return an iterator with support for removals in the underlying set
 */
public Iterator<Short> iterator() {
    return new Iterator<Short>() {
        private final TShortIterator it = _set.iterator();

        public Short next() {
            return Short.valueOf( it.next() );
        }

        public boolean hasNext() {
            return it.hasNext();
        }

        public void remove() {
            it.remove();
        }
    };
}
项目:HCFCore    文件:TShortSetDecorator.java   
/**
 * Creates an iterator over the values of the set.
 *
 * @return an iterator with support for removals in the underlying set
 */
public Iterator<Short> iterator() {
    return new Iterator<Short>() {
        private final TShortIterator it = _set.iterator();

        public Short next() {
            return Short.valueOf( it.next() );
        }

        public boolean hasNext() {
            return it.hasNext();
        }

        public void remove() {
            it.remove();
        }
    };
}
项目:HCFCore    文件:TObjectShortHashMap.java   
/** {@inheritDoc} */
public boolean removeAll( TShortCollection collection ) {
    if ( this == collection ) {
        clear();
        return true;
    }
    boolean changed = false;
    TShortIterator iter = collection.iterator();
    while ( iter.hasNext() ) {
        short element = iter.next();
        if ( remove( element ) ) {
            changed = true;
        }
    }
    return changed;
}
项目:HCFCore    文件:TObjectShortCustomHashMap.java   
/** {@inheritDoc} */
public boolean removeAll( TShortCollection collection ) {
    if ( this == collection ) {
        clear();
        return true;
    }
    boolean changed = false;
    TShortIterator iter = collection.iterator();
    while ( iter.hasNext() ) {
        short element = iter.next();
        if ( remove( element ) ) {
            changed = true;
        }
    }
    return changed;
}
项目:HCFCore    文件:TShortArrayList.java   
/** {@inheritDoc} */
public boolean removeAll( TShortCollection collection ) {
    if ( collection == this ) {
        clear();
        return true;
    }
    boolean changed = false;
    TShortIterator iter = collection.iterator();
    while ( iter.hasNext() ) {
        short element = iter.next();
        if ( remove( element ) ) {
            changed = true;
        }
    }
    return changed;
}
项目:HCFCore    文件:TObjectShortCustomHashMap.java   
/** {@inheritDoc} */
public boolean removeAll( TShortCollection collection ) {
    if ( this == collection ) {
        clear();
        return true;
    }
    boolean changed = false;
    TShortIterator iter = collection.iterator();
    while ( iter.hasNext() ) {
        short element = iter.next();
        if ( remove( element ) ) {
            changed = true;
        }
    }
    return changed;
}
项目:HCFCore    文件:TShortSetDecorator.java   
/**
 * Creates an iterator over the values of the set.
 *
 * @return an iterator with support for removals in the underlying set
 */
public Iterator<Short> iterator() {
    return new Iterator<Short>() {
        private final TShortIterator it = _set.iterator();

        public Short next() {
            return Short.valueOf( it.next() );
        }

        public boolean hasNext() {
            return it.hasNext();
        }

        public void remove() {
            it.remove();
        }
    };
}
项目:HCFCore    文件:TObjectShortHashMap.java   
/** {@inheritDoc} */
public boolean removeAll( TShortCollection collection ) {
    if ( this == collection ) {
        clear();
        return true;
    }
    boolean changed = false;
    TShortIterator iter = collection.iterator();
    while ( iter.hasNext() ) {
        short element = iter.next();
        if ( remove( element ) ) {
            changed = true;
        }
    }
    return changed;
}
项目:HCFCore    文件:TShortObjectHashMap.java   
/** {@inheritDoc} */
public boolean removeAll( TShortCollection collection ) {
    if ( collection == this ) {
        clear();
        return true;
    }
    boolean changed = false;
    TShortIterator iter = collection.iterator();
    while ( iter.hasNext() ) {
        short element = iter.next();
        if ( remove( element ) ) {
            changed = true;
        }
    }
    return changed;
}
项目:HCFCore    文件:TShortLinkedList.java   
/** {@inheritDoc} */
public boolean removeAll(TShortCollection collection) {
    boolean modified = false;
    TShortIterator iter = iterator();
    while (iter.hasNext()) {
        if (collection.contains(iter.next())) {
            iter.remove();
            modified = true;
        }
    }
    return modified;
}
项目:xcc    文件:TObjectShortHashMap.java   
/** {@inheritDoc} */
public boolean containsAll( TShortCollection collection ) {
    TShortIterator iter = collection.iterator();
    while ( iter.hasNext() ) {
        if ( ! TObjectShortHashMap.this.containsValue( iter.next() ) ) {
            return false;
        }
    }
    return true;
}
项目:xcc    文件:TObjectShortHashMap.java   
/** {@inheritDoc} */
@SuppressWarnings({"SuspiciousMethodCalls"})
public boolean retainAll( Collection<?> collection ) {
    boolean modified = false;
    TShortIterator iter = iterator();
    while ( iter.hasNext() ) {
        if ( ! collection.contains( Short.valueOf ( iter.next() ) ) ) {
            iter.remove();
            modified = true;
        }
    }
    return modified;
}
项目:HCFCore    文件:TShortLinkedList.java   
/** {@inheritDoc} */
public boolean retainAll(Collection<?> collection) {
    boolean modified = false;
    TShortIterator iter = iterator();
    while (iter.hasNext()) {
        if (!collection.contains(Short.valueOf(iter.next()))) {
            iter.remove();
            modified = true;
        }
    }
    return modified;
}
项目:HCFCore    文件:TShortLinkedList.java   
/** {@inheritDoc} */
public boolean removeAll(Collection<?> collection) {
    boolean modified = false;
    TShortIterator iter = iterator();
    while (iter.hasNext()) {
        if (collection.contains(Short.valueOf(iter.next()))) {
            iter.remove();
            modified = true;
        }
    }
    return modified;
}
项目:xcc    文件:TShortObjectHashMap.java   
/** {@inheritDoc} */
public boolean containsAll( TShortCollection collection ) {
    if ( collection == this ) {
        return true;
    }
    TShortIterator iter = collection.iterator();
    while ( iter.hasNext() ) {
        if ( ! TShortObjectHashMap.this.containsKey( iter.next() ) ) {
            return false;
        }
    }
    return true;
}
项目:xcc    文件:TShortObjectHashMap.java   
/** {@inheritDoc} */
public boolean retainAll( Collection<?> collection ) {
    boolean modified = false;
    TShortIterator iter = iterator();
    while ( iter.hasNext() ) {
        //noinspection SuspiciousMethodCalls
        if ( ! collection.contains( Short.valueOf ( iter.next() ) ) ) {
            iter.remove();
            modified = true;
        }
    }
    return modified;
}
项目:xcc    文件:TShortObjectHashMap.java   
/** {@inheritDoc} */
public boolean retainAll( TShortCollection collection ) {
    if ( this == collection ) {
        return false;
    }
    boolean modified = false;
    TShortIterator iter = iterator();
    while ( iter.hasNext() ) {
        if ( ! collection.contains( iter.next() ) ) {
            iter.remove();
            modified = true;
        }
    }
    return modified;
}
项目:xcc    文件:TObjectShortCustomHashMap.java   
/** {@inheritDoc} */
public boolean containsAll( TShortCollection collection ) {
    TShortIterator iter = collection.iterator();
    while ( iter.hasNext() ) {
        if ( ! TObjectShortCustomHashMap.this.containsValue( iter.next() ) ) {
            return false;
        }
    }
    return true;
}
项目:xcc    文件:TObjectShortCustomHashMap.java   
/** {@inheritDoc} */
@SuppressWarnings({"SuspiciousMethodCalls"})
public boolean retainAll( Collection<?> collection ) {
    boolean modified = false;
    TShortIterator iter = iterator();
    while ( iter.hasNext() ) {
        if ( ! collection.contains( Short.valueOf ( iter.next() ) ) ) {
            iter.remove();
            modified = true;
        }
    }
    return modified;
}
项目:xcc    文件:TObjectShortCustomHashMap.java   
/** {@inheritDoc} */
public boolean retainAll( TShortCollection collection ) {
    if ( this == collection ) {
        return false;
    }
    boolean modified = false;
    TShortIterator iter = iterator();
    while ( iter.hasNext() ) {
        if ( ! collection.contains( iter.next() ) ) {
            iter.remove();
            modified = true;
        }
    }
    return modified;
}
项目:HCFCore    文件:TShortHashSet.java   
/** {@inheritDoc} */
public boolean addAll( TShortCollection collection ) {
    boolean changed = false;
    TShortIterator iter = collection.iterator();
    while ( iter.hasNext() ) {
        short element = iter.next();
        if ( add( element ) ) {
            changed = true;
        }
    }
    return changed;
}
项目:xcc    文件:TShortHashSet.java   
/** {@inheritDoc} */
public boolean addAll( TShortCollection collection ) {
    boolean changed = false;
    TShortIterator iter = collection.iterator();
    while ( iter.hasNext() ) {
        short element = iter.next();
        if ( add( element ) ) {
            changed = true;
        }
    }
    return changed;
}
项目:xcc    文件:TShortHashSet.java   
/** {@inheritDoc} */
@SuppressWarnings({"SuspiciousMethodCalls"})
public boolean retainAll( Collection<?> collection ) {
    boolean modified = false;
 TShortIterator iter = iterator();
 while ( iter.hasNext() ) {
     if ( ! collection.contains( Short.valueOf ( iter.next() ) ) ) {
      iter.remove();
      modified = true;
     }
 }
 return modified;
}
项目:xcc    文件:TShortHashSet.java   
/** {@inheritDoc} */
public boolean retainAll( TShortCollection collection ) {
    if ( this == collection ) {
        return false;
    }
    boolean modified = false;
 TShortIterator iter = iterator();
 while ( iter.hasNext() ) {
     if ( ! collection.contains( iter.next() ) ) {
      iter.remove();
      modified = true;
     }
 }
 return modified;
}
项目:xcc    文件:TShortHashSet.java   
/** {@inheritDoc} */
public boolean removeAll( TShortCollection collection ) {
    boolean changed = false;
    TShortIterator iter = collection.iterator();
    while ( iter.hasNext() ) {
        short element = iter.next();
        if ( remove( element ) ) {
            changed = true;
        }
    }
    return changed;
}
项目:xcc    文件:TShortArrayList.java   
/** {@inheritDoc} */
public boolean addAll( TShortCollection collection ) {
    boolean changed = false;
    TShortIterator iter = collection.iterator();
    while ( iter.hasNext() ) {
        short element = iter.next();
        if ( add( element ) ) {
            changed = true;
        }
    }
    return changed;
}
项目:xcc    文件:TShortArrayList.java   
/** {@inheritDoc} */
@SuppressWarnings({"SuspiciousMethodCalls"})
public boolean retainAll( Collection<?> collection ) {
    boolean modified = false;
 TShortIterator iter = iterator();
 while ( iter.hasNext() ) {
     if ( ! collection.contains( Short.valueOf ( iter.next() ) ) ) {
      iter.remove();
      modified = true;
     }
 }
 return modified;
}
项目:HCFCore    文件:TShortArrayList.java   
/** {@inheritDoc} */
public boolean addAll( TShortCollection collection ) {
    boolean changed = false;
    TShortIterator iter = collection.iterator();
    while ( iter.hasNext() ) {
        short element = iter.next();
        if ( add( element ) ) {
            changed = true;
        }
    }
    return changed;
}
项目:xcc    文件:TShortLinkedList.java   
public TShortLinkedList(TShortList list) {
    no_entry_value = list.getNoEntryValue();
    //
    for (TShortIterator iterator = list.iterator(); iterator.hasNext();) {
        short next = iterator.next();
        add(next);
    }
}
项目:xcc    文件:TShortLinkedList.java   
/** {@inheritDoc} */
public boolean containsAll(TShortCollection collection) {
    if (isEmpty())
        return false;

    for (TShortIterator it = collection.iterator(); it.hasNext();) {
        short i = it.next();
        if (!(contains(i)))
            return false;
    }
    return true;
}
项目:xcc    文件:TShortLinkedList.java   
/** {@inheritDoc} */
public boolean addAll(TShortCollection collection) {
    boolean ret = false;
    for (TShortIterator it = collection.iterator(); it.hasNext();) {
        short i = it.next();
        if (add(i))
            ret = true;
    }

    return ret;
}
项目:xcc    文件:TShortLinkedList.java   
/** {@inheritDoc} */
public boolean retainAll(Collection<?> collection) {
    boolean modified = false;
    TShortIterator iter = iterator();
    while (iter.hasNext()) {
        if (!collection.contains(Short.valueOf(iter.next()))) {
            iter.remove();
            modified = true;
        }
    }
    return modified;
}
项目:xcc    文件:TShortLinkedList.java   
/** {@inheritDoc} */
public boolean retainAll(TShortCollection collection) {
    boolean modified = false;
    TShortIterator iter = iterator();
    while (iter.hasNext()) {
        if (!collection.contains(iter.next())) {
            iter.remove();
            modified = true;
        }
    }
    return modified;
}
项目:HCFCore    文件:TShortLinkedList.java   
@Override
public String toString() {
    final StringBuilder buf = new StringBuilder("{");
    TShortIterator it = iterator();
    while (it.hasNext()) {
        short next = it.next();
        buf.append(next);
        if (it.hasNext())
            buf.append(", ");
    }
    buf.append("}");
    return buf.toString();

}
项目:xcc    文件:TShortLinkedList.java   
/** {@inheritDoc} */
public boolean removeAll(Collection<?> collection) {
    boolean modified = false;
    TShortIterator iter = iterator();
    while (iter.hasNext()) {
        if (collection.contains(Short.valueOf(iter.next()))) {
            iter.remove();
            modified = true;
        }
    }
    return modified;
}
项目:xcc    文件:TShortLinkedList.java   
/** {@inheritDoc} */
public boolean removeAll(TShortCollection collection) {
    boolean modified = false;
    TShortIterator iter = iterator();
    while (iter.hasNext()) {
        if (collection.contains(iter.next())) {
            iter.remove();
            modified = true;
        }
    }
    return modified;
}