1 /*****************************************************************************
2 * Copyright (c) 2007 Intel Corporation.
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
9 * Intel Corporation - Initial API and implementation
10 * Ruslan A. Scherbakov, Intel - Initial API and implementation
11 * Alvaro Sanchex-Leon - Udpated for TMF
13 * $Id: PlainSelection.java,v 1.1 2007/04/20 13:06:49 ewchan Exp $
14 *****************************************************************************/
16 package org
.eclipse
.linuxtools
.tmf
.ui
.widgets
.timegraph
.widgets
;
18 import java
.util
.ArrayList
;
19 import java
.util
.Iterator
;
20 import java
.util
.List
;
22 import org
.eclipse
.jface
.viewers
.IStructuredSelection
;
24 public class PlainSelection
implements IStructuredSelection
{
26 List
<Object
> list
= new ArrayList
<Object
>();
28 public PlainSelection() {
31 public PlainSelection(Object sel
) {
35 public void add(Object sel
) {
36 if (null != sel
&& !list
.contains(sel
))
41 public Object
getFirstElement() {
48 public Iterator
<Object
> iterator() {
49 return list
.iterator();
58 public Object
[] toArray() {
59 return list
.toArray();
63 public List
<Object
> toList() {
68 public boolean isEmpty() {
69 return list
.isEmpty();
This page took 0.032147 seconds and 5 git commands to generate.