Example usage for com.google.common.collect Iterators unmodifiableIterator

List of usage examples for com.google.common.collect Iterators unmodifiableIterator

Introduction

In this page you can find the example usage for com.google.common.collect Iterators unmodifiableIterator.

Prototype

@Deprecated
public static <T> UnmodifiableIterator<T> unmodifiableIterator(UnmodifiableIterator<T> iterator) 

Source Link

Document

Simply returns its argument.

Usage

From source file:org.richfaces.cdk.model.ModelSet.java

@Override
public Iterator<E> iterator() {
    if (null == comparator) {
        return elements.iterator();
    } else {/*from  w  ww  .  jav a 2s. c  o m*/
        List<E> list = Lists.newArrayList(elements);
        Collections.sort(list, comparator);
        return Iterators.unmodifiableIterator(list.iterator());
    }
}

From source file:org.caleydo.vis.lineup.model.ACompositeRankColumnModel.java

@Override
public final Iterator<ARankColumnModel> iterator() {
    return Iterators.unmodifiableIterator(children.iterator());
}

From source file:org.caleydo.core.data.selection.MultiSelectionManagerMixin.java

@Override
public final Iterator<SelectionManager> iterator() {
    return Iterators.unmodifiableIterator(selectionManagers.iterator());
}

From source file:com.analog.lyric.util.misc.MapList.java

/**
 * Visits entries in index order. {@link Iterator#remove()} is not supported.
 * <p>//from  w  w  w. j  a  va2 s .  c om
 * If this collection was constructed using the {@link #MapList(Iterable)} constructor
 * and no other method has been called, this will simply use the iterable to create
 * an iterator.
 */
@Override
public Iterator<T> iterator() {
    Iterable<T> iterable = _iterable;
    if (iterable == null) {
        iterable = requireNonNull(_arrayList);
    }
    return Iterators.unmodifiableIterator(iterable.iterator());
}

From source file:com.github.autermann.yaml.nodes.YamlPairsNode.java

@Override
public Iterator<YamlNode> iterator() {
    return Iterators.unmodifiableIterator(this.multiMap.keySet().iterator());
}

From source file:org.eclipse.emf.compare.scope.FilterComparisonScope.java

/**
 * {@inheritDoc}//  w  ww  . ja  v  a 2s.  co  m
 * <p>
 * This default implementation will return all direct and indirect content of the given {@link Resource},
 * filtering out those {@link EObject}s that do not match {@link #resourceContentFilter}.
 * </p>
 * 
 * @see org.eclipse.emf.compare.scope.IComparisonScope#getCoveredEObjects(org.eclipse.emf.ecore.resource.Resource)
 */
public Iterator<? extends EObject> getCoveredEObjects(Resource resource) {
    if (resource == null) {
        return Iterators.emptyIterator();
    }

    final Iterator<EObject> properContent = Iterators.filter(EcoreUtil.getAllProperContents(resource, false),
            EObject.class);
    final Iterator<EObject> filter = Iterators.filter(properContent, resourceContentFilter);
    return Iterators.unmodifiableIterator(filter);
}

From source file:org.apache.drill.exec.store.dfs.easy.EasyGroupScan.java

@JsonIgnore
public Iterable<CompleteFileWork> getWorkIterable() {
    return new Iterable<CompleteFileWork>() {
        @Override/*w  w w  . java2  s.c  o m*/
        public Iterator<CompleteFileWork> iterator() {
            return Iterators.unmodifiableIterator(chunks.iterator());
        }
    };
}

From source file:org.onlab.util.UnmodifiableDeque.java

@Override
public Iterator<E> iterator() {
    return Iterators.unmodifiableIterator(deque.iterator());
}

From source file:org.caleydo.vis.lineup.model.mapping.PiecewiseMapping.java

@Override
public Iterator<Entry<Double, Double>> iterator() {
    return Iterators.unmodifiableIterator(mapping.entrySet().iterator());
}

From source file:org.onlab.util.UnmodifiableDeque.java

@Override
public Iterator<E> descendingIterator() {
    return Iterators.unmodifiableIterator(deque.descendingIterator());
}