package com.livingworld.data.serialization;

/**
 * Interface for writing data values with associated keys.
 */
public interface PersistenceWriter {

    /**
     * Writes a string value.
     *
     * @param key   the key identifier
     * @param value the string value to write
     */
    void writeString(String key, String value);

    /**
     * Writes an integer value.
     *
     * @param key   the key identifier
     * @param value the integer value to write
     */
    void writeInt(String key, int value);

    /**
     * Writes a long value.
     *
     * @param key   the key identifier
     * @param value the long value to write
     */
    void writeLong(String key, long value);

    /**
     * Writes a double value.
     *
     * @param key   the key identifier
     * @param value the double value to write
     */
    void writeDouble(String key, double value);

    /**
     * Writes a boolean value.
     *
     * @param key   the key identifier
     * @param value the boolean value to write
     */
    void writeBoolean(String key, boolean value);
}
