Example usage for org.apache.commons.collections IteratorUtils unmodifiableIterator

List of usage examples for org.apache.commons.collections IteratorUtils unmodifiableIterator

Introduction

In this page you can find the example usage for org.apache.commons.collections IteratorUtils unmodifiableIterator.

Prototype

public static Iterator unmodifiableIterator(Iterator iterator) 

Source Link

Document

Gets an immutable version of an Iterator .

Usage

From source file:de.awtools.config.SystemGlueConfig.java

@SuppressWarnings("unchecked")
public Iterator<String> getKeyIterator() {
    Iterator<String> unmodifiableIterator = (Iterator<String>) IteratorUtils
            .unmodifiableIterator(System.getProperties().keySet().iterator());
    return unmodifiableIterator;
}

From source file:de.awtools.config.MapGlueConfig.java

@SuppressWarnings("unchecked")
public Iterator<String> getKeyIterator() {
    return (IteratorUtils.unmodifiableIterator(map.keySet().iterator()));
}

From source file:de.awtools.config.PropertiesGlueConfig.java

@SuppressWarnings("unchecked")
public Iterator<String> getKeyIterator() {
    Iterator<String> unmodifiableIterator = (Iterator<String>) IteratorUtils
            .unmodifiableIterator(properties.keySet().iterator());
    return unmodifiableIterator;
}

From source file:edu.uci.ics.jung.utils.MapBinaryHeap.java

/**
 * Returns an <code>Iterator</code> that does not support modification
 * of the heap./*w  ww. j  a  v a  2 s  .c  om*/
 */
public Iterator iterator() {
    return IteratorUtils.unmodifiableIterator(heap.iterator());
}

From source file:org.apache.sling.superimposing.impl.SuperimposingManagerImpl.java

/**
 * @return Iterator with all superimposing resource providers currently registered.
 *   Iterator is backed by a {@link java.util.concurrent.ConcurrentHashMap} and is safe to access
 *   even if superimposing resource providers are registered or unregistered at the same time.
 *///from  w w  w.j a  v  a 2 s.  c  o m
@SuppressWarnings("unchecked")
public Iterator<SuperimposingResourceProvider> getRegisteredProviders() {
    return IteratorUtils.unmodifiableIterator(superimposingProviders.values().iterator());
}

From source file:org.omnaest.utils.structure.collection.list.ListAbstract.java

@SuppressWarnings("unchecked")
@Override/*from  w  w w .j  a v  a  2s.co  m*/
public Iterator<E> descendingIterator() {
    //    
    return IteratorUtils.unmodifiableIterator(ListUtils.reverse(this).iterator());
}