Enum AdjacencyCursor.EmptyAdjacencyCursor

    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
      INSTANCE  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      long advance​(long nodeId)
      Read and decode target ids until it is larger than or equal (>=) the provided target.
      void close()  
      boolean hasNextVLong()
      Return true iff there is at least one more target to decode.
      void init​(long index, int degree)
      Initialize this cursor to point to the given index.
      long nextVLong()
      Read and decode the next target id.
      long peekVLong()
      Decode and peek the next target id.
      int remaining()
      Return how many targets are still left to be decoded.
      @NotNull AdjacencyCursor shallowCopy​(@Nullable AdjacencyCursor destination)
      Create a shallow copy of this cursor.
      int size()
      Return how many targets can be decoded in total.
      long skipUntil​(long nodeId)
      Read and decode target ids until it is strictly larger than (>) the provided target.
      static AdjacencyCursor.EmptyAdjacencyCursor valueOf​(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.
      • Methods inherited from class java.lang.Enum

        clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, wait, wait, wait
    • 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 name
        java.lang.NullPointerException - if the argument is null
      • init

        public void init​(long index,
                         int degree)
        Description copied from interface: AdjacencyCursor
        Initialize this cursor to point to the given index. The correct value for the index is highly implementation specific. The better way get initialize a cursor is through AdjacencyList.adjacencyCursor(long) or related.
        Specified by:
        init in interface AdjacencyCursor
      • size

        public int size()
        Description copied from interface: AdjacencyCursor
        Return how many targets can be decoded in total. This is equivalent to the degree.
        Specified by:
        size in interface AdjacencyCursor
      • hasNextVLong

        public boolean hasNextVLong()
        Description copied from interface: AdjacencyCursor
        Return true iff there is at least one more target to decode.
        Specified by:
        hasNextVLong in interface AdjacencyCursor
      • remaining

        public int remaining()
        Description copied from interface: AdjacencyCursor
        Return how many targets are still left to be decoded.
        Specified by:
        remaining in interface AdjacencyCursor
      • skipUntil

        public long skipUntil​(long nodeId)
        Description copied from interface: AdjacencyCursor
        Read and decode target ids until it is strictly larger than (>) the provided target. If there are no such targets before this cursor is exhausted, -1 is returned.
        Specified by:
        skipUntil in interface AdjacencyCursor
      • advance

        public long advance​(long nodeId)
        Description copied from interface: AdjacencyCursor
        Read and decode target ids until it is larger than or equal (>=) the provided target. If there are no such targets before this cursor is exhausted, -1 is returned.
        Specified by:
        advance in interface AdjacencyCursor
      • shallowCopy

        @NotNull
        public @NotNull AdjacencyCursor shallowCopy​(@Nullable
                                                    @Nullable AdjacencyCursor destination)
        Description copied from interface: AdjacencyCursor
        Create 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 provided destination argument is not null, it might be re-used instead of having to create a new instance. It is *not* guaranteed that the destination will be reused. If the destination is not if the same type than this cursor, the behavior of this method in undefined.
        Specified by:
        shallowCopy in interface AdjacencyCursor
      • close

        public void close()
        Specified by:
        close in interface AdjacencyCursor
        Specified by:
        close in interface java.lang.AutoCloseable