1 /*******************************************************************************
2 * Copyright (C) 2006, Robin Rosenberg <robin.rosenberg@dewire.com>
3 * Copyright (C) 2008, Shawn O. Pearce <spearce@spearce.org>
5 * All rights reserved. This program and the accompanying materials
6 * are made available under the terms of the Eclipse Public License v1.0
7 * which accompanies this distribution, and is available at
8 * http://www.eclipse.org/legal/epl-v10.html
9 *******************************************************************************/
10 package org
.eclipse
.egit
.core
;
12 import org
.eclipse
.core
.resources
.IResource
;
13 import org
.eclipse
.core
.runtime
.IAdaptable
;
15 /** A list of IResource, adaptable to the first item. */
16 public class ResourceList
implements IAdaptable
{
17 private final IResource
[] list
;
20 * Create a new list of resources.
23 * the items to contain in this list.
25 public ResourceList(final IResource
[] items
) {
30 * Get the items stored in this list.
32 * @return the list provided to our constructor.
34 public IResource
[] getItems() {
38 public Object
getAdapter(final Class adapter
) {
39 if (adapter
== IResource
.class && list
!= null && list
.length
> 0)