|
Eclipse Platform Release 3.2 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.eclipse.jface.viewers.StructuredSelection
public class StructuredSelection
A concrete implementation of the IStructuredSelection interface,
suitable for instantiating.
This class is not intended to be subclassed.
| Field Summary | |
|---|---|
static StructuredSelection |
EMPTY
The canonical empty selection. |
| Constructor Summary | |
|---|---|
StructuredSelection()
Creates a new empty selection. |
|
StructuredSelection(List elements)
Creates a structured selection from the given List. |
|
StructuredSelection(Object element)
Creates a structured selection containing a single object. |
|
StructuredSelection(Object[] elements)
Creates a structured selection from the given elements. |
|
| Method Summary | |
|---|---|
boolean |
equals(Object o)
Returns whether this structured selection is equal to the given object. |
Object |
getFirstElement()
Returns the first element in this selection, or null
if the selection is empty. |
boolean |
isEmpty()
Returns whether this 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. |
String |
toString()
Internal method which returns a string representation of this selection suitable for debug purposes only. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final StructuredSelection EMPTY
null.
| Constructor Detail |
|---|
public StructuredSelection()
EMPTY which contains an empty selection singleton.
EMPTYpublic StructuredSelection(Object[] elements)
elements - an array of elementspublic StructuredSelection(Object element)
null.
element - the elementpublic StructuredSelection(List elements)
List.
| Method Detail |
|---|
public boolean equals(Object o)
equals in class Objecto - the other object
true if they are equal, and false otherwisepublic Object getFirstElement()
IStructuredSelectionnull
if the selection is empty.
getFirstElement in interface IStructuredSelectionnull if nonepublic boolean isEmpty()
ISelection
isEmpty in interface ISelectiontrue if this selection is empty,
and false otherwisepublic Iterator iterator()
IStructuredSelection
iterator in interface IStructuredSelectionpublic int size()
IStructuredSelection
size in interface IStructuredSelectionpublic Object[] toArray()
IStructuredSelection
toArray in interface IStructuredSelectionpublic List toList()
IStructuredSelectionList.
toList in interface IStructuredSelectionpublic String toString()
toString in class Object
|
Eclipse Platform Release 3.2 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
Guidelines for using Eclipse APIs.
Copyright (c) IBM Corp. and others 2000, 2006. All rights reserved.