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

org.opendaylight.ovsdb.lib.notation.OvsdbSet 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.ForwardingSet;
import java.util.HashSet;
import java.util.Set;
import org.opendaylight.ovsdb.lib.notation.json.Converter;
import org.opendaylight.ovsdb.lib.notation.json.OvsdbSetSerializer;

@JsonDeserialize(converter = Converter.SetConverter.class)
@JsonSerialize(using = OvsdbSetSerializer.class)
public class OvsdbSet extends ForwardingSet {

    Set target = new HashSet<>();

    public OvsdbSet() {

    }

    public OvsdbSet(Set backing) {
        this.target = backing;
    }

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

    public static  OvsdbSet fromSet(Set value) {
        return new OvsdbSet<>(value);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy