Interface Entry<K,V>

Type Parameters:
K - key
V - value
All Superinterfaces:
de.linusdev.lutils.collections.Entry<K,V>, de.linusdev.lutils.result.Result
All Known Implementing Classes:
MapEntryImpl, SAOEntryImpl, SimpleEntry

public interface Entry<K,V> extends de.linusdev.lutils.collections.Entry<K,V>
A Entry represents a key-value pair in a AbstractData. Every Entry may only be contained in one AbstractData at a time (This is especially true for SODataMapImpl).
  • Method Details

    • getValue

      V getValue()
      Specified by:
      getValue in interface de.linusdev.lutils.collections.Entry<K,V>
      Returns:
      the value of this entry
    • value

      default V value()
      Specified by:
      value in interface de.linusdev.lutils.collections.Entry<K,V>
    • setValue

      void setValue(V value)
      sets the value of this entry
      Parameters:
      value - the new value for this entry
    • overwriteGetValue

      void overwriteGetValue(@Nullable @Nullable Function<Entry<K,V>,V> getter)
      Internal
      Used by some AbstractData implementations to assure sync between the Entry and the AbstractData
      Parameters:
      getter - the new getter
    • overwriteSetValue

      void overwriteSetValue(@Nullable @Nullable BiConsumer<Entry<K,V>,V> setter)
      Internal
      Used by some AbstractData implementations to assure sync between the Entry and the AbstractData
      Parameters:
      setter - the new setter
    • getKey

      K getKey()
      Specified by:
      getKey in interface de.linusdev.lutils.collections.Entry<K,V>
      Returns:
      the key of this entry
    • key

      default K key()
      Specified by:
      key in interface de.linusdev.lutils.collections.Entry<K,V>