BUG-2218: Keep existing link augmentations during discovery process
[controller.git] / opendaylight / adsal / sal / api / src / main / java / org / opendaylight / controller / sal / core / UpdateType.java
1
2 /*
3  * Copyright (c) 2013 Cisco Systems, Inc. and others.  All rights reserved.
4  *
5  * This program and the accompanying materials are made available under the
6  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
7  * and is available at http://www.eclipse.org/legal/epl-v10.html
8  */
9
10 package org.opendaylight.controller.sal.core;
11
12
13 /**
14  * @file   UpdateType.java
15  *
16  * @brief  Describes update types
17  *
18  */
19 public enum UpdateType {
20     ADDED("added"), REMOVED("removed"), CHANGED("changed");
21
22     private String name;
23
24     UpdateType(String name) {
25         this.name = name;
26     }
27
28     public String getName() {
29         return this.name;
30     }
31
32     public int calculateConsistentHashCode() {
33         if (this.name != null) {
34             return this.name.hashCode();
35         } else {
36             return 0;
37         }
38     }
39 }