Interface IAssignmentDataStore<K,V>

Type Parameters:
K - The key type.
V - The value type.
All Superinterfaces:
IDataStore
All Known Subinterfaces:
IProviderResolverAssignmentDataStore, IRequestableTypeRequestResolverAssignmentDataStore, IRequestResolverRequestAssignmentDataStore, ITokenTokenAssignmentDataStore
All Known Implementing Classes:
StandardProviderRequestResolverAssignmentDataStore, StandardRequestableTypeRequestResolverAssignmentDataStore, StandardRequestResolverRequestAssignmentDataStore

public interface IAssignmentDataStore<K,V> extends IDataStore
A Key-Value-MultiMap Store that handles assignments from a Value to a Key. Allows multiple values to be assigned to a Key.
  • Method Summary

    Modifier and Type
    Method
    Description
    default K
    Returns the key for a value by finding the first key it is assigned to.
    @NotNull Map<K,Collection<V>>
    The K to V assignments.

    Methods inherited from interface com.minecolonies.api.colony.requestsystem.data.IDataStore

    getId, setId
  • Method Details

    • getAssignments

      @NotNull @NotNull Map<K,Collection<V>> getAssignments()
      The K to V assignments.
      Returns:
      The assignments
    • getAssignmentForValue

      @Nullable default K getAssignmentForValue(V value)
      Returns the key for a value by finding the first key it is assigned to.
      Parameters:
      value - The value to look for.
      Returns:
      The key or null.