Class IdEmbedding.Builder

  • Enclosing class:
    IdEmbedding

    public static final class IdEmbedding.Builder
    extends java.lang.Object
    The Builder to construct an IdEmbedding type of Block.
    • Constructor Detail

      • Builder

        public Builder()
    • Method Detail

      • setDictionarySize

        public IdEmbedding.Builder setDictionarySize​(int dictionarySize)
        Sets the number of ids that should be embedded. Valid ids are 0 to dictionarySize - 1.
        Parameters:
        dictionarySize - the number of ids that should be embedded. Valid ids are 0 to dictionarySize - 1.
        Returns:
        this builder
      • setEmbeddingSize

        public IdEmbedding.Builder setEmbeddingSize​(int embeddingSize)
        Sets the size of the embeddings.
        Parameters:
        embeddingSize - the size of the embeddings.
        Returns:
        this builder
      • build

        public IdEmbedding build()
        Builds the IdEmbedding.
        Returns:
        the constructed IdEmbedding
        Throws:
        java.lang.IllegalArgumentException - if all required parameters (items, embeddingSize) have not been set