Package io.github.jwharm.javagi.gio
Interface ListModelJavaList<E extends 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.FontFamilyImpl
,FontMap
,FontMap.FontMapImpl
,FontMap.FontMapImpl
,ListIndexModel
,ListModel.ListModelImpl
,ListModelJavaList.SubList
,ListModelJavaListMutable.SubList
,ListModelJavaListSpliceable.SubList
,ListStore
,MapListModel
,MultiFilter
,MultiFilter.MultiFilterImpl
,MultiSelection
,MultiSorter
,NoSelection
,SectionModel.SectionModelImpl
,SelectionFilterModel
,SelectionModel.SelectionModelImpl
,ShortcutController
,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
Modifier and TypeInterfaceDescriptionstatic class
ListModelJavaList.SubList<E extends GObject,
List extends ListModelJavaList<E>> -
Method Summary
Modifier and TypeMethodDescriptiondefault void
Always throwsUnsupportedOperationException
.default boolean
Always throwsUnsupportedOperationException
.default boolean
addAll
(int index, @NotNull Collection<? extends E> c) default boolean
addAll
(@NotNull Collection<? extends E> c) default void
clear()
default boolean
default boolean
containsAll
(@NotNull Collection<?> c) default E
get
(int index) getItem
(int position) int
default int
default boolean
isEmpty()
iterator()
default int
default @NotNull ListIterator
<E> default @NotNull ListIterator
<E> listIterator
(int index) default E
remove
(int index) Always throwsUnsupportedOperationException
.default boolean
default boolean
removeAll
(@NotNull Collection<?> c) default boolean
retainAll
(@NotNull Collection<?> c) default E
Always throwsUnsupportedOperationException
.default int
size()
subList
(int fromIndex, int toIndex) default Object @NotNull []
toArray()
default <T> T @NotNull []
toArray
(T @NotNull [] a) Methods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArray
Methods 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:
size
in interfaceCollection<E extends GObject>
- Specified by:
size
in interfaceList<E extends GObject>
- API Note:
- This operation is implemented with
ListModel.getNItems()
.
-
isEmpty
-
contains
-
iterator
-
toArray
-
toArray
-
add
Always throwsUnsupportedOperationException
. -
remove
- Specified by:
remove
in interfaceCollection<E extends GObject>
- Specified by:
remove
in interfaceList<E extends GObject>
- API Note:
- This operation is implemented by calling
remove(int)
on the result ofindexOf(Object)
.
-
containsAll
- Specified by:
containsAll
in interfaceCollection<E extends GObject>
- Specified by:
containsAll
in interfaceList<E extends GObject>
- API Note:
- This operation is implemented by calling
contains(Object)
for all elements in the specified collection.
-
addAll
-
addAll
- Specified by:
addAll
in interfaceList<E extends GObject>
- API Note:
- This operation is implemented by calling
add(int, E)
for all elements in the specified collection.
-
removeAll
- Specified by:
removeAll
in interfaceCollection<E extends GObject>
- Specified by:
removeAll
in interfaceList<E extends GObject>
- API Note:
- This operation is implemented with
remove(Object)
for all elements that are in the specified collection.
-
retainAll
- Specified by:
retainAll
in interfaceCollection<E extends GObject>
- Specified by:
retainAll
in interfaceList<E extends 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:
clear
in interfaceCollection<E extends GObject>
- Specified by:
clear
in interfaceList<E extends 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:
lastIndexOf
in interfaceList<E extends GObject>
-
listIterator
- Specified by:
listIterator
in interfaceList<E extends GObject>
-
listIterator
- Specified by:
listIterator
in interfaceList<E extends GObject>
-
subList
-