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 Summary

    Modifier and Type
    Method
    Description
    Gets the value of the key in a result.
    boolean
    Checks if the map has the value mapped to the key
    default boolean
    Returns true if the size is zero.
    Gets all the keys
    default int
    Returns the size of the map.
  • 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.
      Returns:
      the size of the map
    • isEmpty

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