Module org.apache.wicket.core
Class EmptyDataProvider<T>
java.lang.Object
org.apache.wicket.markup.repeater.data.EmptyDataProvider<T>
- Type Parameters:
T
-
- All Implemented Interfaces:
Serializable
,IDataProvider<T>
,IDetachable
,IClusterable
A convenience class to represent an empty data provider.
- Author:
- Phil Kulak
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T> EmptyDataProvider<T>
iterator
(long first, long count) Gets an iterator for the subset of total dataCallback used by the consumer of this data provider to wrap objects retrieved fromIDataProvider.iterator(long, long)
with a model (usually a detachable one).long
size()
Gets total number of items in the collection represented by the DataProviderMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.apache.wicket.markup.repeater.data.IDataProvider
detach
-
Constructor Details
-
EmptyDataProvider
public EmptyDataProvider()
-
-
Method Details
-
getInstance
- Type Parameters:
T
-- Returns:
- the singleton instance of this class
-
iterator
Description copied from interface:IDataProvider
Gets an iterator for the subset of total data- Specified by:
iterator
in interfaceIDataProvider<T>
- Parameters:
first
- first row of datacount
- minimum number of elements to retrieve- Returns:
- iterator capable of iterating over {first, first+count} items
-
size
Description copied from interface:IDataProvider
Gets total number of items in the collection represented by the DataProvider- Specified by:
size
in interfaceIDataProvider<T>
- Returns:
- total item count
-
model
Description copied from interface:IDataProvider
Callback used by the consumer of this data provider to wrap objects retrieved fromIDataProvider.iterator(long, long)
with a model (usually a detachable one).- Specified by:
model
in interfaceIDataProvider<T>
- Parameters:
object
- the object that needs to be wrapped- Returns:
- the model representation of the object
-