Package org.gnome.glib
Class SequenceIter
java.lang.Object
io.github.jwharm.javagi.base.ProxyInstance
org.gnome.glib.SequenceIter
- All Implemented Interfaces:
Proxy
The
GSequenceIter
struct is an opaque data type representing an
iterator pointing into a GSequence
.-
Constructor Summary
ConstructorDescriptionSequenceIter
(MemorySegment address) Create a SequenceIter proxy instance for the provided memory address. -
Method Summary
Modifier and TypeMethodDescriptionint
Returns a negative number if this SequenceIter comes beforeb
, 0 if they are equal, and a positive number if this SequenceIter comes afterb
.int
Returns the position of this SequenceIterReturns theGSequence
that this SequenceIter points into.boolean
isBegin()
Returns whether this SequenceIter is the begin iteratorboolean
isEnd()
Returns whether this SequenceIter is the end iteratormove
(int delta) Returns theGSequenceIter
which isdelta
positions away from this SequenceIter.next()
Returns an iterator pointing to the next position after this SequenceIter.prev()
Returns an iterator pointing to the previous position before this SequenceIter.Methods inherited from class io.github.jwharm.javagi.base.ProxyInstance
equals, handle, hashCode
-
Constructor Details
-
SequenceIter
Create a SequenceIter proxy instance for the provided memory address.- Parameters:
address
- the memory address of the native object
-
-
Method Details
-
compare
Returns a negative number if this SequenceIter comes beforeb
, 0 if they are equal, and a positive number if this SequenceIter comes afterb
.The this SequenceIter and
b
iterators must point into the same sequence.- Parameters:
b
- aGSequenceIter
- Returns:
- a negative number if this SequenceIter comes before
b
, 0 if they are equal, and a positive number if this SequenceIter comes afterb
-
getPosition
public int getPosition()Returns the position of this SequenceIter- Returns:
- the position of this SequenceIter
-
getSequence
Returns theGSequence
that this SequenceIter points into.- Returns:
- the
GSequence
that this SequenceIter points into
-
isBegin
public boolean isBegin()Returns whether this SequenceIter is the begin iterator- Returns:
- whether this SequenceIter is the begin iterator
-
isEnd
public boolean isEnd()Returns whether this SequenceIter is the end iterator- Returns:
- Whether this SequenceIter is the end iterator
-
move
Returns theGSequenceIter
which isdelta
positions away from this SequenceIter. If this SequenceIter is closer than -delta
positions to the beginning of the sequence, the begin iterator is returned. If this SequenceIter is closer thandelta
positions to the end of the sequence, the end iterator is returned.- Parameters:
delta
- A positive or negative number indicating how many positions away from this SequenceIter the returnedGSequenceIter
will be- Returns:
- a
GSequenceIter
which isdelta
positions away from this SequenceIter
-
next
Returns an iterator pointing to the next position after this SequenceIter. If this SequenceIter is the end iterator, the end iterator is returned.- Returns:
- a
GSequenceIter
pointing to the next position after this SequenceIter
-
prev
Returns an iterator pointing to the previous position before this SequenceIter. If this SequenceIter is the begin iterator, the begin iterator is returned.- Returns:
- a
GSequenceIter
pointing to the previous position before this SequenceIter
-