Class Mapping.EmptyMapping<K,​V>

java.lang.Object
de.scravy.bedrock.Mapping.EmptyMapping<K,​V>
All Implemented Interfaces:
ExtendedIterable<Pair<K,​V>>, Function1<K,​V>, HasLengthAtLeast, Mapping<K,​V>, Iterable<Pair<K,​V>>, Function<K,​V>
Enclosing interface:
Mapping<From,​To>

public static class Mapping.EmptyMapping<K,​V>
extends Object
implements Mapping<K,​V>
  • Constructor Details

  • Method Details

    • get

      @Nonnull public Optional<V> get​(K key)
      Description copied from interface: Mapping
      Retrieves the value associated with the given key or Optional.empty() if the key is not mapped to any value.
      Specified by:
      get in interface Mapping<K,​V>
      Parameters:
      key - The key.
      Returns:
      The value which the given key is mapped to.
    • keys

      public Seq<K> keys()
      Specified by:
      keys in interface Mapping<K,​V>
    • equals

      public boolean equals​(Object obj)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object