All Downloads are FREE. Search and download functionalities are using the official Maven repository.

tech.ydb.topic.description.SupportedCodecs Maven / Gradle / Ivy

There is a newer version: 2.3.0
Show newest version
package tech.ydb.topic.description;

import java.util.ArrayList;
import java.util.List;

import com.google.common.collect.ImmutableList;

/**
 * @author Nikolay Perfilov
 */
public class SupportedCodecs {
    private final List codecs;

    public SupportedCodecs(Builder builder) {
        this.codecs = ImmutableList.copyOf(builder.codecs);
    }

    public List getCodecs() {
        return codecs;
    }

    public static Builder newBuilder() {
        return new Builder();
    }

    /**
     * BUILDER
     */
    public static class Builder {
        private List codecs = new ArrayList<>();

        public Builder addCodec(Codec codec) {
            codecs.add(codec);
            return this;
        }

        public Builder setCodecs(List supportedCodecs) {
            this.codecs = supportedCodecs;
            return this;
        }

        public SupportedCodecs build() {
            return new SupportedCodecs(this);
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy