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

项目:xcc    文件:TObjectCharHashMap.java   
/** {@inheritDoc} */
public boolean removeAll( TCharCollection collection ) {
    if ( this == collection ) {
        clear();
        return true;
    }
    boolean changed = false;
    TCharIterator iter = collection.iterator();
    while ( iter.hasNext() ) {
        char element = iter.next();
        if ( remove( element ) ) {
            changed = true;
        }
    }
    return changed;
}
项目:xcc    文件:TCharArrayList.java   
/** {@inheritDoc} */
public boolean removeAll( TCharCollection collection ) {
    if ( collection == this ) {
        clear();
        return true;
    }
    boolean changed = false;
    TCharIterator iter = collection.iterator();
    while ( iter.hasNext() ) {
        char element = iter.next();
        if ( remove( element ) ) {
            changed = true;
        }
    }
    return changed;
}
项目:HCFCore    文件:TCharArrayList.java   
/** {@inheritDoc} */
public boolean removeAll( TCharCollection collection ) {
    if ( collection == this ) {
        clear();
        return true;
    }
    boolean changed = false;
    TCharIterator iter = collection.iterator();
    while ( iter.hasNext() ) {
        char element = iter.next();
        if ( remove( element ) ) {
            changed = true;
        }
    }
    return changed;
}
项目:xcc    文件:TCharLinkedList.java   
@Override
public boolean equals(Object o) {
    if (this == o) return true;
    if (o == null || getClass() != o.getClass()) return false;

    TCharLinkedList that = (TCharLinkedList) o;

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

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

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

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

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

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

        public void remove() {
            it.remove();
        }
    };
}
项目:HCFCore    文件:TObjectCharHashMap.java   
/** {@inheritDoc} */
public boolean removeAll( TCharCollection collection ) {
    if ( this == collection ) {
        clear();
        return true;
    }
    boolean changed = false;
    TCharIterator iter = collection.iterator();
    while ( iter.hasNext() ) {
        char element = iter.next();
        if ( remove( element ) ) {
            changed = true;
        }
    }
    return changed;
}
项目:HCFCore    文件:TObjectCharCustomHashMap.java   
/** {@inheritDoc} */
public boolean removeAll( TCharCollection collection ) {
    if ( this == collection ) {
        clear();
        return true;
    }
    boolean changed = false;
    TCharIterator iter = collection.iterator();
    while ( iter.hasNext() ) {
        char element = iter.next();
        if ( remove( element ) ) {
            changed = true;
        }
    }
    return changed;
}
项目:HCFCore    文件:TCharArrayList.java   
/** {@inheritDoc} */
public boolean removeAll( TCharCollection collection ) {
    if ( collection == this ) {
        clear();
        return true;
    }
    boolean changed = false;
    TCharIterator iter = collection.iterator();
    while ( iter.hasNext() ) {
        char element = iter.next();
        if ( remove( element ) ) {
            changed = true;
        }
    }
    return changed;
}
项目:HCFCore    文件:TCharSetDecorator.java   
/**
 * Creates an iterator over the values of the set.
 *
 * @return an iterator with support for removals in the underlying set
 */
public Iterator<Character> iterator() {
    return new Iterator<Character>() {
        private final TCharIterator it = _set.iterator();

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

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

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

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

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

        public void remove() {
            it.remove();
        }
    };
}
项目:HCFCore    文件:TCharObjectHashMap.java   
/** {@inheritDoc} */
public boolean removeAll( TCharCollection collection ) {
    if ( collection == this ) {
        clear();
        return true;
    }
    boolean changed = false;
    TCharIterator iter = collection.iterator();
    while ( iter.hasNext() ) {
        char element = iter.next();
        if ( remove( element ) ) {
            changed = true;
        }
    }
    return changed;
}
项目:xcc    文件:TCharObjectHashMap.java   
/** {@inheritDoc} */
public boolean containsAll( TCharCollection collection ) {
    if ( collection == this ) {
        return true;
    }
    TCharIterator iter = collection.iterator();
    while ( iter.hasNext() ) {
        if ( ! TCharObjectHashMap.this.containsKey( iter.next() ) ) {
            return false;
        }
    }
    return true;
}
项目:xcc    文件:TCharObjectHashMap.java   
/** {@inheritDoc} */
public boolean retainAll( Collection<?> collection ) {
    boolean modified = false;
    TCharIterator iter = iterator();
    while ( iter.hasNext() ) {
        //noinspection SuspiciousMethodCalls
        if ( ! collection.contains( Character.valueOf ( iter.next() ) ) ) {
            iter.remove();
            modified = true;
        }
    }
    return modified;
}
项目:HCFCore    文件:TCharArrayList.java   
/** {@inheritDoc} */
public boolean containsAll( TCharCollection collection ) {
    if ( this == collection ) {
        return true;
    }
    TCharIterator iter = collection.iterator();
    while ( iter.hasNext() ) {
        char element = iter.next();
        if ( ! contains( element ) ) {
            return false;
        }
    }
    return true;
}
项目:HCFCore    文件:TCharLinkedList.java   
@Override
public String toString() {
    final StringBuilder buf = new StringBuilder("{");
    TCharIterator it = iterator();
    while (it.hasNext()) {
        char next = it.next();
        buf.append(next);
        if (it.hasNext())
            buf.append(", ");
    }
    buf.append("}");
    return buf.toString();

}
项目:HCFCore    文件:TCharLinkedList.java   
/** {@inheritDoc} */
public boolean removeAll(Collection<?> collection) {
    boolean modified = false;
    TCharIterator iter = iterator();
    while (iter.hasNext()) {
        if (collection.contains(Character.valueOf(iter.next()))) {
            iter.remove();
            modified = true;
        }
    }
    return modified;
}
项目:xcc    文件:TObjectCharHashMap.java   
/** {@inheritDoc} */
@SuppressWarnings({"SuspiciousMethodCalls"})
public boolean retainAll( Collection<?> collection ) {
    boolean modified = false;
    TCharIterator iter = iterator();
    while ( iter.hasNext() ) {
        if ( ! collection.contains( Character.valueOf ( iter.next() ) ) ) {
            iter.remove();
            modified = true;
        }
    }
    return modified;
}
项目:xcc    文件:TObjectCharHashMap.java   
/** {@inheritDoc} */
public boolean retainAll( TCharCollection collection ) {
    if ( this == collection ) {
        return false;
    }
    boolean modified = false;
    TCharIterator iter = iterator();
    while ( iter.hasNext() ) {
        if ( ! collection.contains( iter.next() ) ) {
            iter.remove();
            modified = true;
        }
    }
    return modified;
}
项目:HCFCore    文件:TCharLinkedList.java   
/** {@inheritDoc} */
public boolean removeAll(TCharCollection collection) {
    boolean modified = false;
    TCharIterator iter = iterator();
    while (iter.hasNext()) {
        if (collection.contains(iter.next())) {
            iter.remove();
            modified = true;
        }
    }
    return modified;
}
项目:xcc    文件:TObjectCharCustomHashMap.java   
/** {@inheritDoc} */
public boolean containsAll( TCharCollection collection ) {
    TCharIterator iter = collection.iterator();
    while ( iter.hasNext() ) {
        if ( ! TObjectCharCustomHashMap.this.containsValue( iter.next() ) ) {
            return false;
        }
    }
    return true;
}
项目:xcc    文件:TObjectCharCustomHashMap.java   
/** {@inheritDoc} */
@SuppressWarnings({"SuspiciousMethodCalls"})
public boolean retainAll( Collection<?> collection ) {
    boolean modified = false;
    TCharIterator iter = iterator();
    while ( iter.hasNext() ) {
        if ( ! collection.contains( Character.valueOf ( iter.next() ) ) ) {
            iter.remove();
            modified = true;
        }
    }
    return modified;
}
项目:xcc    文件:TObjectCharCustomHashMap.java   
/** {@inheritDoc} */
public boolean retainAll( TCharCollection collection ) {
    if ( this == collection ) {
        return false;
    }
    boolean modified = false;
    TCharIterator iter = iterator();
    while ( iter.hasNext() ) {
        if ( ! collection.contains( iter.next() ) ) {
            iter.remove();
            modified = true;
        }
    }
    return modified;
}
项目:HCFCore    文件:TCharHashSet.java   
/** {@inheritDoc} */
public boolean retainAll( TCharCollection collection ) {
    if ( this == collection ) {
        return false;
    }
    boolean modified = false;
 TCharIterator iter = iterator();
 while ( iter.hasNext() ) {
     if ( ! collection.contains( iter.next() ) ) {
      iter.remove();
      modified = true;
     }
 }
 return modified;
}
项目:xcc    文件:TCharHashSet.java   
/** {@inheritDoc} */
public boolean containsAll( TCharCollection collection ) {
    TCharIterator iter = collection.iterator();
    while ( iter.hasNext() ) {
        char element = iter.next();
        if ( ! contains( element ) ) {
            return false;
        }
    }
    return true;
}
项目:xcc    文件:TCharHashSet.java   
/** {@inheritDoc} */
public boolean addAll( TCharCollection collection ) {
    boolean changed = false;
    TCharIterator iter = collection.iterator();
    while ( iter.hasNext() ) {
        char element = iter.next();
        if ( add( element ) ) {
            changed = true;
        }
    }
    return changed;
}
项目:xcc    文件:TCharHashSet.java   
/** {@inheritDoc} */
@SuppressWarnings({"SuspiciousMethodCalls"})
public boolean retainAll( Collection<?> collection ) {
    boolean modified = false;
 TCharIterator iter = iterator();
 while ( iter.hasNext() ) {
     if ( ! collection.contains( Character.valueOf ( iter.next() ) ) ) {
      iter.remove();
      modified = true;
     }
 }
 return modified;
}
项目:xcc    文件:TCharHashSet.java   
/** {@inheritDoc} */
public boolean retainAll( TCharCollection collection ) {
    if ( this == collection ) {
        return false;
    }
    boolean modified = false;
 TCharIterator iter = iterator();
 while ( iter.hasNext() ) {
     if ( ! collection.contains( iter.next() ) ) {
      iter.remove();
      modified = true;
     }
 }
 return modified;
}
项目:xcc    文件:TCharHashSet.java   
/** {@inheritDoc} */
public boolean removeAll( TCharCollection collection ) {
    boolean changed = false;
    TCharIterator iter = collection.iterator();
    while ( iter.hasNext() ) {
        char element = iter.next();
        if ( remove( element ) ) {
            changed = true;
        }
    }
    return changed;
}
项目:xcc    文件:TCharArrayList.java   
/** {@inheritDoc} */
public boolean containsAll( TCharCollection collection ) {
    if ( this == collection ) {
        return true;
    }
    TCharIterator iter = collection.iterator();
    while ( iter.hasNext() ) {
        char element = iter.next();
        if ( ! contains( element ) ) {
            return false;
        }
    }
    return true;
}
项目:xcc    文件:TCharArrayList.java   
/** {@inheritDoc} */
@SuppressWarnings({"SuspiciousMethodCalls"})
public boolean retainAll( Collection<?> collection ) {
    boolean modified = false;
 TCharIterator iter = iterator();
 while ( iter.hasNext() ) {
     if ( ! collection.contains( Character.valueOf ( iter.next() ) ) ) {
      iter.remove();
      modified = true;
     }
 }
 return modified;
}
项目:HCFCore    文件:TCharArrayList.java   
/** {@inheritDoc} */
@SuppressWarnings({"SuspiciousMethodCalls"})
public boolean retainAll( Collection<?> collection ) {
    boolean modified = false;
 TCharIterator iter = iterator();
 while ( iter.hasNext() ) {
     if ( ! collection.contains( Character.valueOf ( iter.next() ) ) ) {
      iter.remove();
      modified = true;
     }
 }
 return modified;
}
项目:xcc    文件:TCharLinkedList.java   
public TCharLinkedList(TCharList list) {
    no_entry_value = list.getNoEntryValue();
    //
    for (TCharIterator iterator = list.iterator(); iterator.hasNext();) {
        char next = iterator.next();
        add(next);
    }
}
项目:HCFCore    文件:TCharLinkedList.java   
/** {@inheritDoc} */
public boolean retainAll(TCharCollection collection) {
    boolean modified = false;
    TCharIterator iter = iterator();
    while (iter.hasNext()) {
        if (!collection.contains(iter.next())) {
            iter.remove();
            modified = true;
        }
    }
    return modified;
}
项目:xcc    文件:TCharLinkedList.java   
/** {@inheritDoc} */
public boolean retainAll(TCharCollection collection) {
    boolean modified = false;
    TCharIterator iter = iterator();
    while (iter.hasNext()) {
        if (!collection.contains(iter.next())) {
            iter.remove();
            modified = true;
        }
    }
    return modified;
}
项目:xcc    文件:TCharLinkedList.java   
/** {@inheritDoc} */
public boolean retainAll(char[] array) {
    Arrays.sort(array);

    boolean modified = false;
    TCharIterator iter = iterator();
    while (iter.hasNext()) {
        if (Arrays.binarySearch(array, iter.next()) < 0) {
            iter.remove();
            modified = true;
        }
    }
    return modified;
}
项目:xcc    文件:TCharLinkedList.java   
/** {@inheritDoc} */
public boolean removeAll(Collection<?> collection) {
    boolean modified = false;
    TCharIterator iter = iterator();
    while (iter.hasNext()) {
        if (collection.contains(Character.valueOf(iter.next()))) {
            iter.remove();
            modified = true;
        }
    }
    return modified;
}
项目:HCFCore    文件:TCharLinkedList.java   
/** {@inheritDoc} */
public boolean retainAll(Collection<?> collection) {
    boolean modified = false;
    TCharIterator iter = iterator();
    while (iter.hasNext()) {
        if (!collection.contains(Character.valueOf(iter.next()))) {
            iter.remove();
            modified = true;
        }
    }
    return modified;
}
项目:HCFCore    文件:TCharHashSet.java   
/** {@inheritDoc} */
public boolean containsAll( TCharCollection collection ) {
    TCharIterator iter = collection.iterator();
    while ( iter.hasNext() ) {
        char element = iter.next();
        if ( ! contains( element ) ) {
            return false;
        }
    }
    return true;
}
项目:xcc    文件:TCharLinkedList.java   
/** {@inheritDoc} */
public TCharIterator iterator() {
    return new TCharIterator() {
        TCharLink l = head;
        TCharLink current;

        public char next() {
            if (no(l))
                throw new NoSuchElementException();

            char ret = l.getValue();
            current = l;
            l = l.getNext();

            return ret;
        }

        public boolean hasNext() {
            return got(l);
        }

        public void remove() {
            if (current == null)
                throw new IllegalStateException();

            removeLink(current);
            current = null;
        }
    };
}
项目:HCFCore    文件:TCharLinkedList.java   
/** {@inheritDoc} */
public boolean addAll(TCharCollection collection) {
    boolean ret = false;
    for (TCharIterator it = collection.iterator(); it.hasNext();) {
        char i = it.next();
        if (add(i))
            ret = true;
    }

    return ret;
}