package org.opennaas.core.resources.api.model;
/*
* #%L
* OpenNaaS :: Core :: Resources
* %%
* Copyright (C) 2007 - 2014 FundaciĆ³ Privada i2CAT, Internet i InnovaciĆ³ a Catalunya
* %%
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Lesser Public License for more details.
*
* You should have received a copy of the GNU General Lesser Public
* License along with this program. If not, see
* <http://www.gnu.org/licenses/lgpl-3.0.html>.
* #L%
*/
import java.io.Serializable;
import java.util.Collection;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
/**
*
* @author Adrian Rosello Rey (i2CAT)
*
*/
@XmlRootElement(name = "resourcesTypes")
@XmlAccessorType(XmlAccessType.FIELD)
public class ResourceTypeListWrapper implements Serializable {
/**
*
*/
private static final long serialVersionUID = 5397914714077525973L;
@XmlElement(name = "resourceType")
private Collection<String> resourcesTypes;
public Collection<String> getResourcesTypes() {
return resourcesTypes;
}
public void setResourcesTypes(Collection<String> resourcesTypes) {
this.resourcesTypes = resourcesTypes;
}
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + ((resourcesTypes == null) ? 0 : resourcesTypes.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;
ResourceTypeListWrapper other = (ResourceTypeListWrapper) obj;
if (resourcesTypes == null) {
if (other.resourcesTypes != null)
return false;
} else if (!resourcesTypes.equals(other.resourcesTypes))
return false;
return true;
}
}