Eclipse Platform
2.0

org.eclipse.jface.viewers
Interface IStructuredSelection

All Superinterfaces:
ISelection
All Known Implementing Classes:
StructuredSelection

public interface IStructuredSelection
extends ISelection

A selection containing elements.


Method Summary
 Object getFirstElement()
          Returns the first element in this selection, or null if the selection is empty.
 Iterator iterator()
          Returns an iterator over the elements of this selection.
 int size()
          Returns the number of elements selected in this selection.
 Object[] toArray()
          Returns the elements in this selection as an array.
 List toList()
          Returns the elements in this selection as a List.
 
Methods inherited from interface org.eclipse.jface.viewers.ISelection
isEmpty
 

Method Detail

getFirstElement

public Object getFirstElement()
Returns the first element in this selection, or null if the selection is empty.

Returns:
an element, or null if none

iterator

public Iterator iterator()
Returns an iterator over the elements of this selection.

Returns:
an iterator over the selected elements

size

public int size()
Returns the number of elements selected in this selection.

Returns:
the number of elements selected

toArray

public Object[] toArray()
Returns the elements in this selection as an array.

Returns:
the selected elements as an array

toList

public List toList()
Returns the elements in this selection as a List.

Returns:
the selected elements as a list

Eclipse Platform
2.0

Copyright (c) IBM Corp. and others 2000, 2002. All Rights Reserved.