Class InOrderMapCursor<K,V>

java.lang.Object
tools.refinery.store.map.internal.state.InOrderMapCursor<K,V>
All Implemented Interfaces:
Cursor<K,V>

public class InOrderMapCursor<K,V> extends Object implements Cursor<K,V>
  • Constructor Details

  • Method Details

    • getKey

      public K getKey()
      Specified by:
      getKey in interface Cursor<K,V>
    • getValue

      public V getValue()
      Specified by:
      getValue in interface Cursor<K,V>
    • isTerminated

      public boolean isTerminated()
      Specified by:
      isTerminated in interface Cursor<K,V>
    • move

      public boolean move()
      Specified by:
      move in interface Cursor<K,V>
    • skipCurrentNode

      public boolean skipCurrentNode()
    • isDirty

      public boolean isDirty()
      Specified by:
      isDirty in interface Cursor<K,V>
    • getDependingMaps

      public Set<AnyVersionedMap> getDependingMaps()
      Specified by:
      getDependingMaps in interface Cursor<K,V>
    • sameSubNode

      public static <K, V> boolean sameSubNode(InOrderMapCursor<K,V> cursor1, InOrderMapCursor<K,V> cursor2)
    • comparePosition

      public static <K, V> int comparePosition(InOrderMapCursor<K,V> cursor1, InOrderMapCursor<K,V> cursor2)
      Compares the state of two cursors started on two VersionedMap of the same VersionedMapStore.
      Type Parameters:
      K - Key type
      V - Value type
      Parameters:
      cursor1 - first cursor
      cursor2 - second cursor
      Returns:
      Positive number if cursor 1 is behind, negative number if cursor 2 is behind, and 0 if they are at the same position.
    • compareDepth

      public static <K, V> int compareDepth(InOrderMapCursor<K,V> cursor1, InOrderMapCursor<K,V> cursor2)
      Compares the depth of two cursors started on @VersionedMap of the same VersionedMapStore.
      Type Parameters:
      K - Key type
      V - Value type
      Parameters:
      cursor1 - first cursor
      cursor2 - second cursor
      Returns:
      Positive number if cursor 1 is deeper, negative number if cursor 2 is deeper, and 0 if they are at the same depth.