Package org.gnome.glib
Class SequenceIter
java.lang.Object
org.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
ConstructorsConstructorDescriptionSequenceIter(MemorySegment address) Create a SequenceIter proxy instance for the provided memory address. -
Method Summary
Modifier and TypeMethodDescriptionintReturns a negative number if this SequenceIter comes beforeb,0 if they are equal, and a positive number if this SequenceIter comes afterb.intReturns the position of this SequenceIterReturns theGSequencethat this SequenceIter points into.booleanisBegin()Returns whether this SequenceIter is the begin iteratorbooleanisEnd()Returns whether this SequenceIter is the end iteratormove(int delta) Returns theGSequenceIterwhich isdeltapositions away fromiter.If this SequenceIter is closer than -deltapositions to the beginning of the sequence, the begin iterator is returned.next()Returns an iterator pointing to the next position afteriter.If this SequenceIter is the end iterator, the end iterator is returned.prev()Returns an iterator pointing to the previous position beforeiter.If this SequenceIter is the begin iterator, the begin iterator is returned.Methods inherited from class org.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
biterators 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 - Since:
- 2.14
-
getPosition
public int getPosition()Returns the position of this SequenceIter- Returns:
- the position of this SequenceIter
- Since:
- 2.14
-
getSequence
Returns theGSequencethat this SequenceIter points into.- Returns:
- the
GSequencethat this SequenceIter points into - Since:
- 2.14
-
isBegin
public boolean isBegin()Returns whether this SequenceIter is the begin iterator- Returns:
- whether this SequenceIter is the begin iterator
- Since:
- 2.14
-
isEnd
public boolean isEnd()Returns whether this SequenceIter is the end iterator- Returns:
- Whether this SequenceIter is the end iterator
- Since:
- 2.14
-
move
Returns theGSequenceIterwhich isdeltapositions away fromiter.If this SequenceIter is closer than -deltapositions to the beginning of the sequence, the begin iterator is returned. If this SequenceIter is closer thandeltapositions 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 returnedGSequenceIterwill be- Returns:
- a
GSequenceIterwhich isdeltapositions away from this SequenceIter - Since:
- 2.14
-
next
Returns an iterator pointing to the next position afteriter.If this SequenceIter is the end iterator, the end iterator is returned.- Returns:
- a
GSequenceIterpointing to the next position after this SequenceIter - Since:
- 2.14
-
prev
Returns an iterator pointing to the previous position beforeiter.If this SequenceIter is the begin iterator, the begin iterator is returned.- Returns:
- a
GSequenceIterpointing to the previous position before this SequenceIter - Since:
- 2.14
-