2 * Copyright 2016 ZTE Corporation.
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
16 package org.openo.msb.wrapper.consul.model.catalog;
18 import com.google.common.base.Objects;
20 public class ServiceInfo {
22 private String serviceName;
24 private String version="";
26 public String getServiceName() {
30 public void setServiceName(String serviceName) {
31 this.serviceName = serviceName;
34 public String getVersion() {
38 public void setVersion(String version) {
39 this.version = version;
43 public boolean equals(Object other)
47 if(other instanceof ServiceInfo)
49 ServiceInfo that = (ServiceInfo)other;
50 return Objects.equal(serviceName, that.serviceName) && Objects.equal(version, that.version);
58 public int hashCode() {
59 return Objects.hashCode(serviceName, version);