KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > update > search > EnvironmentFilter


1 /*******************************************************************************
2  * Copyright (c) 2000, 2006 IBM Corporation and others.
3  * All rights reserved. This program and the accompanying materials
4  * are made available under the terms of the Eclipse Public License v1.0
5  * which accompanies this distribution, and is available at
6  * http://www.eclipse.org/legal/epl-v10.html
7  *
8  * Contributors:
9  * IBM Corporation - initial API and implementation
10  *******************************************************************************/

11 package org.eclipse.update.search;
12
13 import org.eclipse.update.core.*;
14 import org.eclipse.update.internal.core.*;
15
16 /**
17  * This class can be added to the update search request
18  * to filter out features that do not match the current
19  * environment settings.
20  *
21  * <p>
22  * <b>Note:</b> This class/interface is part of an interim API that is still under development and expected to
23  * change significantly before reaching stability. It is being made available at this early stage to solicit feedback
24  * from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken
25  * (repeatedly) as the API evolves.
26  * </p>
27  * @see UpdateSearchRequest
28  * @see IUpdateSearchFilter
29  * @since 3.0
30  */

31 public class EnvironmentFilter extends BaseFilter {
32     
33     public boolean accept(IFeature match) {
34         return UpdateManagerUtils.isValidEnvironment(match);
35     }
36     
37     public boolean accept(IFeatureReference match) {
38         return UpdateManagerUtils.isValidEnvironment(match);
39     }
40 }
41
Popular Tags