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

com.github.thomasridd.flatsy.operations.operators.UriToMap Maven / Gradle / Ivy

There is a newer version: 0.0.6
Show newest version
package com.github.thomasridd.flatsy.operations.operators;

import com.github.thomasridd.flatsy.FlatsyObject;

import java.util.concurrent.ConcurrentMap;

/**
 * Created by thomasridd on 18/08/15.
 *
 * Migrate
 *
 * Copies the object and contents to a second FlatsyDatabase instance
 *
 * Use for backup, partial backup, or
 *
 */
public class UriToMap implements FlatsyOperator {
    ConcurrentMap map;
    String value;

    public UriToMap(ConcurrentMap map, String value) {
        this.map = map;
        this.value = value;
    }

    @Override
    public void apply(FlatsyObject object) {
        map.put(object.uri.toString(), value);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy