2 * Copyright (C) 2013 EBay Software Foundation
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 : Ashwin Raveendran, Madhu Venugopal
10 package org.opendaylight.ovsdb.lib.notation;
12 import org.opendaylight.ovsdb.lib.notation.json.UUIDSerializer;
13 import org.opendaylight.ovsdb.lib.notation.json.UUIDStringConverter;
15 import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
16 import com.fasterxml.jackson.databind.annotation.JsonSerialize;
18 @JsonDeserialize(contentConverter = UUIDStringConverter.class)
19 @JsonSerialize(using = UUIDSerializer.class)
21 * Handles both uuid and named-uuid.
26 public UUID(String value) {
31 public String toString() {
36 public int hashCode() {
39 result = prime * result + ((val == null) ? 0 : val.hashCode());
44 public boolean equals(Object obj) {
49 if (getClass() != obj.getClass())
51 UUID other = (UUID) obj;
53 if (other.val != null)
55 } else if (!val.equals(other.val))