
org.eclipse.equinox.p2.query.Collector Maven / Gradle / Ivy
The newest version!
/*******************************************************************************
* Copyright (c) 2007, 2010 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* IBM Corporation - initial API and implementation
* EclipseSource - ongoing development
*******************************************************************************/
package org.eclipse.equinox.p2.query;
import java.lang.reflect.Array;
import java.util.*;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.equinox.internal.p2.metadata.Messages;
/**
* A collector is a generic visitor that collects objects passed to it,
* and can then express the result of the visit in various forms. The collector
* can also short-circuit a traversal by returning false
from
* its {@link #accept(Object)} method.
*
* This default collector just accepts all objects passed to it. Clients may subclass
* to perform different processing on the objects passed to it.
* @param The type of object accepted by this collector
* @since 2.0
*/
public class Collector implements IQueryResult {
private Set collected = null;
public static final Collector> EMPTY_COLLECTOR = new Collector
© 2015 - 2025 Weber Informatics LLC | Privacy Policy