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

org.vertexium.GraphMetadataEntry Maven / Gradle / Ivy

There is a newer version: 4.10.0
Show newest version
package org.vertexium;

import org.vertexium.util.JavaSerializableUtils;

public class GraphMetadataEntry {
    private String key;
    private byte[] valueData;
    private volatile Object value;

    public GraphMetadataEntry(String key, byte[] valueData) {
        this.key = key;
        this.valueData = valueData;
    }

    public GraphMetadataEntry(String key, Object value) {
        this.key = key;
        this.value = value;
    }

    public String getKey() {
        return key;
    }

    public Object getValue() {
        if (value != null) {
            return value;
        }
        return value = JavaSerializableUtils.bytesToObject(valueData);
    }

    @Override
    public String toString() {
        return "GraphMetadataEntry{" +
            "key='" + key + '\'' +
            ", value=" + value +
            '}';
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy