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

org.opendaylight.ovsdb.lib.notation.OvsdbMap Maven / Gradle / Ivy

/*
 * Copyright © 2013, 2017 EBay Software Foundation and others. All rights reserved.
 *
 * This program and the accompanying materials are made available under the
 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
 * and is available at http://www.eclipse.org/legal/epl-v10.html
 */
package org.opendaylight.ovsdb.lib.notation;

import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.google.common.collect.ForwardingMap;
import java.util.HashMap;
import java.util.Map;
import org.opendaylight.ovsdb.lib.notation.json.Converter;
import org.opendaylight.ovsdb.lib.notation.json.OvsdbMapSerializer;

@JsonDeserialize(converter = Converter.MapConverter.class)
@JsonSerialize(using = OvsdbMapSerializer.class)
public class OvsdbMap extends ForwardingMap {
    private final Map target = new HashMap<>();

    public OvsdbMap() {

    }

    public OvsdbMap(Map value) {
        this.target.putAll(value);
    }

    @Override
    public Map delegate() {
        return target;
    }

    public static  OvsdbMap fromMap(Map value) {
        return new OvsdbMap<>(value);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy