Remove yang-test
[controller.git] / opendaylight / config / config-manager / src / main / java / org / opendaylight / controller / config / manager / impl / TransactionIdentifier.java
1 /*
2  * Copyright (c) 2013, 2017 Cisco Systems, Inc. and others.  All rights reserved.
3  *
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
7  */
8 package org.opendaylight.controller.config.manager.impl;
9
10 import org.opendaylight.yangtools.concepts.Identifier;
11
12 public class TransactionIdentifier implements Identifier {
13     private static final long serialVersionUID = 1L;
14     private final String name;
15
16     public TransactionIdentifier(final String name) {
17         this.name = name;
18     }
19
20     @Override
21     public String toString() {
22         return "TransactionIdentifier{" + "name='" + name + '\'' + '}';
23     }
24
25     public String getName() {
26         return name;
27     }
28
29     @Override
30     public boolean equals(final Object object) {
31         if (this == object) {
32             return true;
33         }
34         if (object == null || getClass() != object.getClass()) {
35             return false;
36         }
37
38         TransactionIdentifier that = (TransactionIdentifier) object;
39
40         if (name != null ? !name.equals(that.name) : that.name != null) {
41             return false;
42         }
43
44         return true;
45     }
46
47     @Override
48     public int hashCode() {
49         return name != null ? name.hashCode() : 0;
50     }
51 }

©2013 OpenDaylight, A Linux Foundation Collaborative Project. All Rights Reserved.
OpenDaylight is a registered trademark of The OpenDaylight Project, Inc.
Linux Foundation and OpenDaylight are registered trademarks of the Linux Foundation.
Linux is a registered trademark of Linus Torvalds.