Interface MapCursor<K,V>

All Superinterfaces:
UnmodifiableMapCursor<K,V>

public interface MapCursor<K,V> extends UnmodifiableMapCursor<K,V>
Cursor to iterate over a mutable map.
Since:
19.0
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Remove the current entry from the map.
    default V
    setValue(V newValue)
    Set the value of the current entry.

    Methods inherited from interface org.graalvm.collections.UnmodifiableMapCursor

    advance, getKey, getValue
  • Method Details

    • remove

      void remove()
      Remove the current entry from the map. May only be called once. After calling remove(), it is no longer valid to call UnmodifiableMapCursor.getKey() or UnmodifiableMapCursor.getValue() on the current entry.
      Since:
      19.0
    • setValue

      default V setValue(V newValue)
      Set the value of the current entry.
      Parameters:
      newValue - new value to be associated with the current key.
      Returns:
      previous value associated with the current key.
      Since:
      22.1