Class ListIndexModel
java.lang.Object
org.javagi.base.ProxyInstance
org.gnome.gobject.TypeInstance
org.gnome.gobject.GObject
org.javagi.gio.ListIndexModel
- All Implemented Interfaces:
Iterable<ListIndexModel.ListIndex>, Collection<ListIndexModel.ListIndex>, List<ListIndexModel.ListIndex>, SequencedCollection<ListIndexModel.ListIndex>, ListModel<ListIndexModel.ListIndex>, Proxy, ListModelJavaList<ListIndexModel.ListIndex>
@NullMarked
public class ListIndexModel
extends GObject
implements ListModel<ListIndexModel.ListIndex>
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classSmall GObject-derived class with a numeric "index" field.Nested classes/interfaces inherited from class GObject
GObject.Builder<B>, GObject.NotifyCallback, GObject.ObjectClassNested classes/interfaces inherited from interface ListModel
ListModel.ItemsChangedCallback, ListModel.ListModel$Impl, ListModel.ListModelInterfaceNested classes/interfaces inherited from interface ListModelJavaList
ListModelJavaList.SubList<E,List> -
Constructor Summary
ConstructorsConstructorDescriptionListIndexModel(int size) Construct a ListIndexModel for the provided memory address. -
Method Summary
Modifier and TypeMethodDescription@Nullable ListIndexModel.ListIndexgetItem(int position) Returns aListIndexModel.ListIndexwith the requested position as its value.Get the gtype ofListIndexModel.ListIndex.intGet the size of the list model.static TypegetType()Return the GType for the ListIndexModel.static ListIndexModelnewInstance(int size) Deprecated.voidsetItemType(Type itemType) No-op.voidsetSize(int size) Set the size field to the provided value, and emit the "items-changed" signal.Methods inherited from class GObject
addToggleRef, addWeakPointer, asParent, bindProperty, bindProperty, bindProperty, bindPropertyFull, bindPropertyFull, bindPropertyWithClosures, bindPropertyWithClosures, builder, compatControl, connect, connect, connect, constructed, disconnect, dispatchPropertiesChanged, dispose, dupData, dupQdata, emit, emitNotify, finalize_, forceFloating, freezeNotify, get, getData, getMemoryLayout, getProperty, getProperty, getProperty, getQdata, getv, interfaceFindProperty, interfaceInstallProperty, interfaceListProperties, isFloating, newInstance, newInstance, newv, notify, notify, notifyByPspec, onNotify, ref, refSink, removeToggleRef, removeWeakPointer, replaceData, replaceQdata, runDispose, set, setData, setDataFull, setProperty, setProperty, setProperty, setQdata, setQdataFull, setv, stealData, stealQdata, takeRef, thawNotify, unref, watchClosure, weakRef, weakUnref, withPropertiesMethods inherited from class TypeInstance
callParent, callParent, cast, getPrivate, readGClass, writeGClassMethods inherited from class ProxyInstance
equals, handle, hashCodeMethods inherited from class Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Collection
parallelStream, removeIf, stream, toArrayMethods inherited from interface List
addFirst, addLast, equals, getFirst, getLast, hashCode, removeFirst, removeLast, replaceAll, reversed, sort, spliteratorMethods inherited from interface ListModel
emitItemsChanged, itemsChanged, onItemsChangedMethods inherited from interface ListModelJavaList
add, add, addAll, addAll, clear, contains, containsAll, get, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, retainAll, set, size, subList, toArray, toArray
-
Constructor Details
-
ListIndexModel
public ListIndexModel(int size) Construct a ListIndexModel for the provided memory address.- Parameters:
size- the initial list size
-
-
Method Details
-
getType
-
newInstance
Deprecated.Replaced withListIndexModel(int)Construct a new ListIndexModel with the provided size.- Parameters:
size- the initial size of the list model
-
setSize
public void setSize(int size) Set the size field to the provided value, and emit the "items-changed" signal.- Parameters:
size- the new list model size
-
getItemType
Get the gtype ofListIndexModel.ListIndex.- Specified by:
getItemTypein interfaceListModel<ListIndexModel.ListIndex>- Returns:
- always returns the value of
ListIndexModel.ListIndex.getType()
-
setItemType
No-op. The item type is alwaysListIndexModel.ListIndex.getType().- Parameters:
itemType- ignored
-
getNItems
public int getNItems()Get the size of the list model.- Specified by:
getNItemsin interfaceListModel<ListIndexModel.ListIndex>- Specified by:
getNItemsin interfaceListModelJavaList<ListIndexModel.ListIndex>- Returns:
- the value of the size field
-
getItem
Returns aListIndexModel.ListIndexwith the requested position as its value.- Specified by:
getItemin interfaceListModel<ListIndexModel.ListIndex>- Specified by:
getItemin interfaceListModelJavaList<ListIndexModel.ListIndex>- Parameters:
position- the position of the item to fetch- Returns:
- a
ListIndexModel.ListIndexwith the requested position as its value
-
ListIndexModel(int)