blob: f22a73d8a9f9135d92808cf8822e046d7d11829c [file] [log] [blame]
/**
* Copyright (c) 2018 CEA.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* CEA - initial API and implementation and/or initial documentation
*/
package org.eclipse.sensinact.studio.http.client.snamessage.completelist;
import java.util.List;
/**
* @author Etienne Gandrille
*/
public class ObjectProvider {
private String name;
private String location;
private List<ObjectService> services;
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getLocation() {
return location;
}
public void setLocation(String location) {
this.location = location;
}
public List<ObjectService> getServices() {
return services;
}
public void setServices(List<ObjectService> services) {
this.services = services;
}
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + ((location == null) ? 0 : location.hashCode());
result = prime * result + ((name == null) ? 0 : name.hashCode());
result = prime * result + ((services == null) ? 0 : services.hashCode());
return result;
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (getClass() != obj.getClass())
return false;
ObjectProvider other = (ObjectProvider) obj;
if (location == null) {
if (other.location != null)
return false;
} else if (!location.equals(other.location))
return false;
if (name == null) {
if (other.name != null)
return false;
} else if (!name.equals(other.name))
return false;
if (services == null) {
if (other.services != null)
return false;
} else if (!services.equals(other.services))
return false;
return true;
}
@Override
public String toString() {
return "ObjectProviders [name=" + name + ", location=" + location + ", services=" + services + "]";
}
}