Skip to main content
aboutsummaryrefslogtreecommitdiffstats
blob: 0713925548b4daff884aba47a5669891c4154b26 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
/*******************************************************************************
 * Copyright (c) 2001, 2008 Oracle Corporation and others.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License 2.0
 * which accompanies this distribution, and is available at
 * https://www.eclipse.org/legal/epl-2.0/
 *
 * SPDX-License-Identifier: EPL-2.0
 * 
 * Contributors:
 *     Oracle Corporation - initial API and implementation
 *******************************************************************************/
package org.eclipse.jst.jsf.common.internal.policy;

import java.util.Collection;
import java.util.Iterator;

/**
 * A policy that allows a strategy composite to change the order in which
 * it queries it's list of strategies.
 * 
 * @author cbateman
 * @param <ITERATORTYPE> 
 *
 */
public interface IIteratorPolicy<ITERATORTYPE>
{
    /**
     * @param forCollection 
     * @return an iterator that controls the ordering through forCollection
     * in a policy directed way.  The policy may take a copy of the collection
     * or may choose to iterate in place.
     */
    Iterator<ITERATORTYPE>  getIterator(Collection<ITERATORTYPE> forCollection);
}

Back to the top