|
Eclipse Platform 2.1 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--org.eclipse.jface.viewers.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 objecttrue if they are equal, and false otherwisepublic Object getFirstElement()
IStructuredSelectionnull
if the selection is empty.getFirstElement in interface IStructuredSelectionorg.eclipse.jface.viewers.IStructuredSelectionnull if nonepublic boolean isEmpty()
ISelectionisEmpty in interface ISelectionorg.eclipse.jface.viewers.ISelectiontrue if this selection is empty,
and false otherwisepublic Iterator iterator()
IStructuredSelectioniterator in interface IStructuredSelectionorg.eclipse.jface.viewers.IStructuredSelectionpublic int size()
IStructuredSelectionsize in interface IStructuredSelectionorg.eclipse.jface.viewers.IStructuredSelectionpublic Object[] toArray()
IStructuredSelectiontoArray in interface IStructuredSelectionorg.eclipse.jface.viewers.IStructuredSelectionpublic List toList()
IStructuredSelectionList.toList in interface IStructuredSelectionorg.eclipse.jface.viewers.IStructuredSelectionpublic String toString()
toString in class Object
|
Eclipse Platform 2.1 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||