Package org.luwrain.controls
Class ListUtils.ArrayModel<E>
java.lang.Object
org.luwrain.controls.ListUtils.ArrayModel<E>
- All Implemented Interfaces:
ListArea.Model<E>
- Enclosing class:
ListUtils
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
source
-
-
Constructor Details
-
ArrayModel
-
-
Method Details
-
getItemCount
public int getItemCount()Description copied from interface:ListArea.ModelReturns the total number of items in the model.- Specified by:
getItemCountin interfaceListArea.Model<E>- Returns:
- the item count
-
getItem
Description copied from interface:ListArea.ModelReturns the item at the given index.- Specified by:
getItemin interfaceListArea.Model<E>- Parameters:
index- the zero-based index of the item- Returns:
- the item at that position, or
nullif the index is out of bounds
-
refresh
public void refresh()Description copied from interface:ListArea.ModelCalled when the underlying data has changed and the list needs to be refreshed. Implementations should reload or update their data.- Specified by:
refreshin interfaceListArea.Model<E>
-