Package org.javagi.gio
Interface ListModelJavaList<E extends @Nullable GObject>
- Type Parameters:
E- The item type must be a GObject.
- All Superinterfaces:
Collection<E>,Iterable<E>,List<E>,SequencedCollection<E>
- All Known Subinterfaces:
ListModel<T>,ListModelJavaListMutable<E>,ListModelJavaListSpliceable<E>,SectionModel<T>,SelectionModel<T>
- All Known Implementing Classes:
AnyFilter,BookmarkList,CompletionContext,DirectoryList,EnumListModel,EveryFilter,FilterListModel,FlattenListModel,FontFamily,FontFamily.FontFamily$Impl,FontMap,FontMap.FontMap$Impl,FontMap.FontMap$Impl,ListIndexModel,ListModel.ListModel$Impl,ListModelJavaList.SubList,ListModelJavaListMutable.SubList,ListModelJavaListSpliceable.SubList,ListStore,MapListModel,MultiFilter,MultiFilter.MultiFilter$Impl,MultiSelection,MultiSorter,NoSelection,SectionModel.SectionModel$Impl,SelectionFilterModel,SelectionModel.SelectionModel$Impl,ShortcutController,ShortcutsSection,SingleSelection,SliceListModel,SortListModel,StringList,TreeListModel,ViewStackPages
This interface is implemented by
ListModel, so it can be used like a
regular Java List.
Because ListModel only defines operations to retrieve items and
size, the default implementations of the List mutator methods
throw UnsupportedOperationException. ListModel implementations that
support mutation must override the following methods:
clear()
with a more efficient implementation.-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic classListModelJavaList.SubList<E extends @Nullable GObject,List extends ListModelJavaList<E>> -
Method Summary
Modifier and TypeMethodDescriptiondefault voidAlways throwsUnsupportedOperationException.default booleanAlways throwsUnsupportedOperationException.default booleanaddAll(int index, Collection<? extends E> c) default booleanaddAll(Collection<? extends E> c) default voidclear()default booleandefault booleancontainsAll(Collection<?> c) default Eget(int index) getItem(int position) intdefault intdefault booleanisEmpty()iterator()default intlastIndexOf(@Nullable Object o) default ListIterator<E> default ListIterator<E> listIterator(int index) default Eremove(int index) Always throwsUnsupportedOperationException.default booleandefault booleanremoveAll(Collection<?> c) default booleanretainAll(Collection<?> c) default EAlways throwsUnsupportedOperationException.default intsize()subList(int fromIndex, int toIndex) default @Nullable Object[]toArray()default <T extends @Nullable Object>
@Nullable T[]toArray(@Nullable T[] a) Methods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArrayMethods inherited from interface java.util.List
addFirst, addLast, equals, getFirst, getLast, hashCode, removeFirst, removeLast, replaceAll, reversed, sort, spliterator
-
Method Details
-
getNItems
int getNItems() -
getItem
-
size
default int size()- Specified by:
sizein interfaceCollection<E extends @Nullable GObject>- Specified by:
sizein interfaceList<E extends @Nullable GObject>- API Note:
- This operation is implemented with
ListModel.getNItems().
-
isEmpty
-
contains
-
iterator
-
toArray
-
toArray
-
add
Always throwsUnsupportedOperationException. -
remove
- Specified by:
removein interfaceCollection<E extends @Nullable GObject>- Specified by:
removein interfaceList<E extends @Nullable GObject>- API Note:
- This operation is implemented by calling
remove(int)on the result ofindexOf(Object).
-
containsAll
- Specified by:
containsAllin interfaceCollection<E extends @Nullable GObject>- Specified by:
containsAllin interfaceList<E extends @Nullable GObject>- API Note:
- This operation is implemented by calling
contains(Object)for all elements in the specified collection.
-
addAll
-
addAll
- Specified by:
addAllin interfaceList<E extends @Nullable GObject>- API Note:
- This operation is implemented by calling
add(int, E)for all elements in the specified collection.
-
removeAll
- Specified by:
removeAllin interfaceCollection<E extends @Nullable GObject>- Specified by:
removeAllin interfaceList<E extends @Nullable GObject>- API Note:
- This operation is implemented with
remove(Object)for all elements that are in the specified collection.
-
retainAll
- Specified by:
retainAllin interfaceCollection<E extends @Nullable GObject>- Specified by:
retainAllin interfaceList<E extends @Nullable GObject>- API Note:
- This operation is implemented with
remove(Object)for all elements that are not in the specified collection.
-
clear
default void clear()- Specified by:
clearin interfaceCollection<E extends @Nullable GObject>- Specified by:
clearin interfaceList<E extends @Nullable GObject>- API Note:
- This operation is implemented by repeatedly calling
remove(int)until the list is empty.
-
get
-
set
-
add
-
remove
-
indexOf
-
lastIndexOf
- Specified by:
lastIndexOfin interfaceList<E extends @Nullable GObject>
-
listIterator
- Specified by:
listIteratorin interfaceList<E extends @Nullable GObject>
-
listIterator
- Specified by:
listIteratorin interfaceList<E extends @Nullable GObject>
-
subList
-