public class IterableDataModel<E> extends DataModel<E>
DataModel
that wraps an Iterable
.
This can be used to encapsulate nearly every collection type, including Collection
derived types such as
List
and Set
. As such this specific DataModel can be used instead of more specific DataModels like
ListDataModel
and JSF 2.2's CollectionDataModel.
Constructor and Description |
---|
IterableDataModel(Iterable<E> iterable) |
Modifier and Type | Method and Description |
---|---|
int |
getRowCount() |
E |
getRowData() |
int |
getRowIndex() |
Object |
getWrappedData() |
boolean |
isRowAvailable() |
void |
setRowIndex(int rowIndex) |
void |
setWrappedData(Object data) |
addDataModelListener, getDataModelListeners, iterator, removeDataModelListener
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
forEach, spliterator
public boolean isRowAvailable()
isRowAvailable
in class DataModel<E>
public int getRowCount()
getRowCount
in class DataModel<E>
public E getRowData()
getRowData
in class DataModel<E>
public int getRowIndex()
getRowIndex
in class DataModel<E>
public void setRowIndex(int rowIndex)
setRowIndex
in class DataModel<E>
public Object getWrappedData()
getWrappedData
in class DataModel<E>
public void setWrappedData(Object data)
setWrappedData
in class DataModel<E>
Copyright © 2012–2017 OmniFaces. All rights reserved.