2 * Copyright (c) 2013, 2015 EBay Software Foundation and others. All rights reserved.
4 * This program and the accompanying materials are made available under the
5 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6 * and is available at http://www.eclipse.org/legal/epl-v10.html
9 package org.opendaylight.ovsdb.lib.notation;
11 import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
12 import com.fasterxml.jackson.databind.annotation.JsonSerialize;
13 import com.google.common.collect.ForwardingSet;
14 import com.google.common.collect.Sets;
16 import org.opendaylight.ovsdb.lib.notation.json.Converter;
17 import org.opendaylight.ovsdb.lib.notation.json.OvsdbSetSerializer;
21 @JsonDeserialize(converter = Converter.SetConverter.class)
22 @JsonSerialize(using = OvsdbSetSerializer.class)
23 public class OvsdbSet<T> extends ForwardingSet<T> {
28 this(Sets.<T>newHashSet());
31 public OvsdbSet(Set<T> backing) {
32 this.target = backing;
36 public Set<T> delegate() {
40 public static <D> OvsdbSet<D> fromSet(Set<D> value) {
41 return new OvsdbSet<>(value);