Package org.eclipse.jface.viewers
Class ArrayContentProvider
java.lang.Object
org.eclipse.jface.viewers.ArrayContentProvider
- All Implemented Interfaces:
IContentProvider
,IStructuredContentProvider
This implementation of
IStructuredContentProvider
handles
the case where the viewer input is an unchanging array or collection of elements.
This class is not intended to be subclassed outside the viewer framework.
- Since:
- 2.1
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionObject[]
getElements
(Object inputElement) Returns the elements in the input, which must be either an array or aCollection
.static ArrayContentProvider
Returns an instance of ArrayContentProvider.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.eclipse.jface.viewers.IContentProvider
dispose, inputChanged
-
Constructor Details
-
ArrayContentProvider
public ArrayContentProvider()
-
-
Method Details
-
getInstance
Returns an instance of ArrayContentProvider. Since instances of this class do not maintain any state, they can be shared between multiple clients.- Returns:
- an instance of ArrayContentProvider
- Since:
- 3.5
-
getElements
Returns the elements in the input, which must be either an array or aCollection
.- Specified by:
getElements
in interfaceIStructuredContentProvider
- Parameters:
inputElement
- the input element- Returns:
- the array of elements to display in the viewer
-