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

it.auties.whatsapp.model.signal.session.SessionChainBuilder Maven / Gradle / Ivy

package it.auties.whatsapp.model.signal.session;

public class SessionChainBuilder {
    private java.util.concurrent.atomic.AtomicInteger counter;
    private java.util.concurrent.atomic.AtomicReference key;
    private java.util.concurrent.ConcurrentHashMap messageKeys;

    public SessionChainBuilder() {
        counter = new java.util.concurrent.atomic.AtomicInteger();
        key = new java.util.concurrent.atomic.AtomicReference();
        messageKeys = new java.util.concurrent.ConcurrentHashMap();
    }

    public SessionChainBuilder counter(java.util.concurrent.atomic.AtomicInteger counter) {
        this.counter = counter;
        return this;
    }
    public SessionChainBuilder counter(java.lang.Integer counter) {
        this.counter = new java.util.concurrent.atomic.AtomicInteger(counter);
        return this;
    }
    public SessionChainBuilder key(java.util.concurrent.atomic.AtomicReference key) {
        this.key = key;
        return this;
    }
    public SessionChainBuilder key(byte[] key) {
        this.key = new java.util.concurrent.atomic.AtomicReference(key);
        return this;
    }
    public SessionChainBuilder messageKeys(java.util.concurrent.ConcurrentHashMap messageKeys) {
        this.messageKeys = messageKeys;
        return this;
    }

    public it.auties.whatsapp.model.signal.session.SessionChain build() {
        return new it.auties.whatsapp.model.signal.session.SessionChain(counter, key, messageKeys);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy