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

com.infomaximum.database.schema.HashIndex Maven / Gradle / Ivy

The newest version!
package com.infomaximum.database.schema;

import com.infomaximum.database.utils.TypeConvert;

import java.util.Collection;
import java.util.Collections;

public class HashIndex extends BaseIndex {

    private final static byte[] INDEX_NAME_BYTES = TypeConvert.pack("hsh");

    HashIndex(com.infomaximum.database.anotation.HashIndex index, StructEntity parent) {
        super(buildIndexedFields(index.fields(), parent), parent);
    }

    public HashIndex(Field field, StructEntity parent) {
        super(Collections.singletonList(field), parent);
    }

    public static String toString(Collection indexedFields) {
        return HashIndex.class.getSimpleName() + ": " + indexedFields;
    }

    @Override
    public byte[] getIndexNameBytes() {
        return INDEX_NAME_BYTES;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy