<commit_before>package com.jivesoftware.os.jive.utils.map.store;

import com.jivesoftware.os.jive.utils.io.ByteBufferFactory;
import com.jivesoftware.os.jive.utils.io.FilerIO;
import com.jivesoftware.os.jive.utils.io.HeapByteBufferFactory;
import com.jivesoftware.os.jive.utils.map.store.BytesBytesMapStore;
import com.jivesoftware.os.jive.utils.map.store.api.KeyValueStore;

/*
 * $Revision$
 * $Date$
 *
 * Copyright (C) 1999-$year$ Jive Software. All rights reserved.
 *
 * This software is the proprietary information of Jive Software. Use is subject to license terms.
 */
/**
 *
 * @author jonathan.colt
 */
public class PrimativesMapStoresBuilder {

    private ByteBufferFactory bufferFactory = new HeapByteBufferFactory();
    private int initialPageCapacity = 8;

    public PrimativesMapStoresBuilder() {
    }

    public PrimativesMapStoresBuilder setByteBufferFactory(ByteBufferFactory bufferFactory) {
        this.bufferFactory = bufferFactory;
        return this;
    }

    public PrimativesMapStoresBuilder setInitialPageCapacity(int initialPageCapacity) {
        this.initialPageCapacity = initialPageCapacity;
        return this;
    }

    public KeyValueStore<Long, Long> buildLongLong() {
        return new BytesBytesMapStore<Long, Long>(8, 8, initialPageCapacity, null, bufferFactory) {

            @Override
            public byte[] keyBytes(Long key) {
                return FilerIO.longBytes(key);
            }

            @Override
            public byte[] valueBytes(Long value) {
                return FilerIO.longBytes(value);
            }

            @Override
            public Long bytesKey(byte[] bytes, int offset) {
                return FilerIO.bytesLong(bytes, offset);
            }

            @Override
            public Long bytesValue(Long key, byte[] bytes, int offset) {
                return FilerIO.bytesLong(bytes, offset);
            }
        };
    }

    public KeyValueStore<Long, Integer> buildLongInt() {
        return new BytesBytesMapStore<Long, Integer>(8, 4, initialPageCapacity, null, bufferFactory) {

            @Override
            public byte[] keyBytes(Long key) {
                return FilerIO.longBytes(key);
            }

            @Override
            public byte[] valueBytes(Integer value) {
                return FilerIO.intBytes(value);
            }

            @Override
            public Long bytesKey(byte[] bytes, int offset) {
                return FilerIO.bytesLong(bytes, offset);
            }

            @Override
            public Integer bytesValue(Long key, byte[] bytes, int offset) {
                return FilerIO.bytesInt(bytes, offset);
            }
        };
    }
}
<commit_msg>fixed PrimitivesMapStoresBuilder class to file name alignment.<commit_after>package com.jivesoftware.os.jive.utils.map.store;

import com.jivesoftware.os.jive.utils.io.ByteBufferFactory;
import com.jivesoftware.os.jive.utils.io.FilerIO;
import com.jivesoftware.os.jive.utils.io.HeapByteBufferFactory;
import com.jivesoftware.os.jive.utils.map.store.BytesBytesMapStore;
import com.jivesoftware.os.jive.utils.map.store.api.KeyValueStore;

/*
 * $Revision$
 * $Date$
 *
 * Copyright (C) 1999-$year$ Jive Software. All rights reserved.
 *
 * This software is the proprietary information of Jive Software. Use is subject to license terms.
 */
/**
 *
 * @author jonathan.colt
 */
public class PrimitivesMapStoresBuilder {

    private ByteBufferFactory bufferFactory = new HeapByteBufferFactory();
    private int initialPageCapacity = 8;

    public PrimitivesMapStoresBuilder() {
    }

    public PrimitivesMapStoresBuilder setByteBufferFactory(ByteBufferFactory bufferFactory) {
        this.bufferFactory = bufferFactory;
        return this;
    }

    public PrimitivesMapStoresBuilder setInitialPageCapacity(int initialPageCapacity) {
        this.initialPageCapacity = initialPageCapacity;
        return this;
    }

    public KeyValueStore<Long, Long> buildLongLong() {
        return new BytesBytesMapStore<Long, Long>(8, 8, initialPageCapacity, null, bufferFactory) {

            @Override
            public byte[] keyBytes(Long key) {
                return FilerIO.longBytes(key);
            }

            @Override
            public byte[] valueBytes(Long value) {
                return FilerIO.longBytes(value);
            }

            @Override
            public Long bytesKey(byte[] bytes, int offset) {
                return FilerIO.bytesLong(bytes, offset);
            }

            @Override
            public Long bytesValue(Long key, byte[] bytes, int offset) {
                return FilerIO.bytesLong(bytes, offset);
            }
        };
    }

    public KeyValueStore<Long, Integer> buildLongInt() {
        return new BytesBytesMapStore<Long, Integer>(8, 4, initialPageCapacity, null, bufferFactory) {

            @Override
            public byte[] keyBytes(Long key) {
                return FilerIO.longBytes(key);
            }

            @Override
            public byte[] valueBytes(Integer value) {
                return FilerIO.intBytes(value);
            }

            @Override
            public Long bytesKey(byte[] bytes, int offset) {
                return FilerIO.bytesLong(bytes, offset);
            }

            @Override
            public Integer bytesValue(Long key, byte[] bytes, int offset) {
                return FilerIO.bytesInt(bytes, offset);
            }
        };
    }
}

{'fraction_non_alphanumeric': 0.08947849954254346, 'fraction_numerical': 0.003293687099725526, 'mean_word_length': 2.292771084337349, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5534060', 'n_tokens_mistral': 1538, 'n_tokens_neox': 1463, 'n_words': 336}