2 * Copyright (C) 2013 Red Hat, Inc.
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
8 * Authors : Madhu Venugopal, Brent Salisbury
11 package org.opendaylight.ovsdb.plugin;
12 import java.net.InetAddress;
14 import javax.xml.bind.annotation.XmlAccessType;
15 import javax.xml.bind.annotation.XmlAccessorType;
16 import javax.xml.bind.annotation.XmlElement;
17 import javax.xml.bind.annotation.XmlRootElement;
19 import org.opendaylight.controller.sal.core.Property;
22 @XmlAccessorType(XmlAccessType.NONE)
23 public class IPAddressProperty extends Property implements Cloneable {
24 private static final long serialVersionUID = 1L;
25 @XmlElement(name="value")
26 private final InetAddress address;
27 public static final String name = "IPAddress";
30 * Private constructor used for JAXB mapping
32 private IPAddressProperty() {
37 public IPAddressProperty(InetAddress address) {
39 this.address = address;
43 public String getStringValue() {
44 if (address == null) return null;
45 return this.address.getHostAddress();
49 public Property clone() {
50 return new IPAddressProperty(this.address);
53 public InetAddress getAddress() {