Interface MapBuilder<Type>

Type Parameters:
Type - the type to encode.
All Superinterfaces:
Function<MapHasher<Type>,MapHasher<Type>>, UnaryOperator<MapHasher<Type>>
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface MapBuilder<Type> extends UnaryOperator<MapHasher<Type>>
MapBuilders can be used to define map-like structures to encode a MapBuilder using a MapHasher.
  • Method Summary

    Modifier and Type
    Method
    Description
    default <Casted> MapBuilder<Casted>
    Casts this map builder to a MapBuilder.
    static <Type> MapBuilder<Type>
    Returns a map builder that doesn't contain anything.

    Methods inherited from interface java.util.function.Function

    andThen, apply, compose
  • Method Details

    • cast

      default <Casted> MapBuilder<Casted> cast()
      Casts this map builder to a MapBuilder. This cast is done unsafely, only use this if you are sure the object being encoded is of the type being cast to!
      Type Parameters:
      Casted - the type to cast to.
    • unit

      static <Type> MapBuilder<Type> unit()
      Returns a map builder that doesn't contain anything.
      Type Parameters:
      Type - the type to encode.