/* * Copyright (c) 2013, 2015 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 java.util.Map; import org.opendaylight.ovsdb.lib.notation.json.Converter; import org.opendaylight.ovsdb.lib.notation.json.OvsdbMapSerializer; import com.fasterxml.jackson.databind.annotation.JsonDeserialize; import com.fasterxml.jackson.databind.annotation.JsonSerialize; import com.google.common.collect.ForwardingMap; import com.google.common.collect.Maps; @JsonDeserialize(converter = Converter.MapConverter.class) @JsonSerialize(using = OvsdbMapSerializer.class) public class OvsdbMap extends ForwardingMap { Map target = Maps.newHashMap(); public OvsdbMap() { this(Maps.newHashMap()); } public OvsdbMap(Map value) { this.target = value; } @Override public Map delegate() { return target; } public static OvsdbMap fromMap(Map value) { return new OvsdbMap(value); } }