Interface Transcoder.MapLike<D>

Type Parameters:
D - the transcoder type
Enclosing interface:
Transcoder<D>

public static interface Transcoder.MapLike<D>
Represents an immutable Map like object.
  • Method Details

    • keys

      Gets all the keys
      Returns:
      the collection of keys
    • hasValue

      @Contract(pure=true) boolean hasValue(String key)
      Checks if the map has the value mapped to the key
      Parameters:
      key - the key to check
      Returns:
      true if present; false otherwise
    • getValue

      Result<D> getValue(String key)
      Gets the value of the key in a result.
      Check if the key has a value using hasValue(String)
      Parameters:
      key - the key to use
      Returns:
      the result, Result.Error if missing
    • size

      @Contract(pure=true) default int size()
      Returns:
      the size of the map
    • isEmpty

      @Contract(pure=true) default boolean isEmpty()
      Returns:
      true if the size is zero