Package org.neo4j.gds.api
Enum AdjacencyCursor.EmptyAdjacencyCursor
- java.lang.Object
-
- java.lang.Enum<AdjacencyCursor.EmptyAdjacencyCursor>
-
- org.neo4j.gds.api.AdjacencyCursor.EmptyAdjacencyCursor
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.AutoCloseable,java.lang.Comparable<AdjacencyCursor.EmptyAdjacencyCursor>,AdjacencyCursor
- Enclosing interface:
- AdjacencyCursor
public static enum AdjacencyCursor.EmptyAdjacencyCursor extends java.lang.Enum<AdjacencyCursor.EmptyAdjacencyCursor> implements AdjacencyCursor
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.neo4j.gds.api.AdjacencyCursor
AdjacencyCursor.EmptyAdjacencyCursor
-
-
Enum Constant Summary
Enum Constants Enum Constant Description INSTANCE
-
Field Summary
-
Fields inherited from interface org.neo4j.gds.api.AdjacencyCursor
NOT_FOUND
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description longadvance(long nodeId)Read and decode target ids until it is larger than or equal (>=) the providedtarget.longadvanceBy(int n)Advance this cursor bynelements.voidclose()booleanhasNextVLong()Return true iff there is at least one more target to decode.voidinit(long index, int degree)Initialize this cursor to point to the givenindex.longnextVLong()Read and decode the next target id.longpeekVLong()Decode and peek the next target id.intremaining()Return how many targets are still left to be decoded.@NotNull AdjacencyCursorshallowCopy(@Nullable AdjacencyCursor destination)Create a shallow copy of this cursor.intsize()Return how many targets can be decoded in total.longskipUntil(long nodeId)Read and decode target ids until it is strictly larger than (>) the providedtarget.static AdjacencyCursor.EmptyAdjacencyCursorvalueOf(java.lang.String name)Returns the enum constant of this type with the specified name.static AdjacencyCursor.EmptyAdjacencyCursor[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
INSTANCE
public static final AdjacencyCursor.EmptyAdjacencyCursor INSTANCE
-
-
Method Detail
-
values
public static AdjacencyCursor.EmptyAdjacencyCursor[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (AdjacencyCursor.EmptyAdjacencyCursor c : AdjacencyCursor.EmptyAdjacencyCursor.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static AdjacencyCursor.EmptyAdjacencyCursor valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
java.lang.IllegalArgumentException- if this enum type has no constant with the specified namejava.lang.NullPointerException- if the argument is null
-
init
public void init(long index, int degree)Description copied from interface:AdjacencyCursorInitialize this cursor to point to the givenindex. The correct value for the index is highly implementation specific. The better way get initialize a cursor is throughAdjacencyList.adjacencyCursor(long)or related.- Specified by:
initin interfaceAdjacencyCursor
-
size
public int size()
Description copied from interface:AdjacencyCursorReturn how many targets can be decoded in total. This is equivalent to the degree.- Specified by:
sizein interfaceAdjacencyCursor
-
hasNextVLong
public boolean hasNextVLong()
Description copied from interface:AdjacencyCursorReturn true iff there is at least one more target to decode.- Specified by:
hasNextVLongin interfaceAdjacencyCursor
-
nextVLong
public long nextVLong()
Description copied from interface:AdjacencyCursorRead and decode the next target id. It is undefined behavior if this is called afterAdjacencyCursor.hasNextVLong()returnsfalse.- Specified by:
nextVLongin interfaceAdjacencyCursor
-
peekVLong
public long peekVLong()
Description copied from interface:AdjacencyCursorDecode and peek the next target id. Does not progress the internal cursor unlikeAdjacencyCursor.nextVLong(). It is undefined behavior if this is called afterAdjacencyCursor.hasNextVLong()returnsfalse.- Specified by:
peekVLongin interfaceAdjacencyCursor
-
remaining
public int remaining()
Description copied from interface:AdjacencyCursorReturn how many targets are still left to be decoded.- Specified by:
remainingin interfaceAdjacencyCursor
-
skipUntil
public long skipUntil(long nodeId)
Description copied from interface:AdjacencyCursorRead and decode target ids until it is strictly larger than (>) the providedtarget. If there are no such targets before this cursor is exhausted,-1is returned.- Specified by:
skipUntilin interfaceAdjacencyCursor
-
advance
public long advance(long nodeId)
Description copied from interface:AdjacencyCursorRead and decode target ids until it is larger than or equal (>=) the providedtarget. If there are no such targets before this cursor is exhausted,-1is returned.- Specified by:
advancein interfaceAdjacencyCursor
-
advanceBy
public long advanceBy(int n)
Description copied from interface:AdjacencyCursorAdvance this cursor bynelements. For a cursor in its initial position, this is equivalent tonth.- Specified by:
advanceByin interfaceAdjacencyCursor- Parameters:
n- the number of elements to advance by. Must be positive.- Returns:
- the target after the advancement or
-1if the cursor is exhausted.
-
shallowCopy
@NotNull public @NotNull AdjacencyCursor shallowCopy(@Nullable @Nullable AdjacencyCursor destination)
Description copied from interface:AdjacencyCursorCreate a shallow copy of this cursor. Iteration state is copied and will advance independently from this cursor. The underlying data might be shared between instances. If the provideddestinationargument is not null, it might be re-used instead of having to create a new instance. It is *not* guaranteed that thedestinationwill be reused. If thedestinationis not if the same type than this cursor, the behavior of this method in undefined.- Specified by:
shallowCopyin interfaceAdjacencyCursor
-
close
public void close()
- Specified by:
closein interfaceAdjacencyCursor- Specified by:
closein interfacejava.lang.AutoCloseable
-
-