com.offbytwo.jenkins.model.View Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jenkins-client Show documentation
Show all versions of jenkins-client Show documentation
A Jenkins API client for Java
package com.offbytwo.jenkins.model;
import com.thoughtworks.xstream.XStream;
import com.thoughtworks.xstream.io.json.JsonHierarchicalStreamDriver;
public class View extends MainView {
private String name = "";
private String description = "";
private String url = "";
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public View() {
}
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
public String getUrl() {
return url;
}
public void setUrl(String url) {
this.url = url;
}
@Override
public String toString() {
XStream xstream = new XStream(new JsonHierarchicalStreamDriver());
return xstream.toXML(this);
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
View view = (View) o;
if (description != null ? !description.equals(view.description) : view.description != null)
return false;
if (name != null ? !name.equals(view.name) : view.name != null)
return false;
if (url != null ? !url.equals(view.url) : view.url != null)
return false;
return true;
}
@Override
public int hashCode() {
int result = name != null ? name.hashCode() : 0;
result = 31 * result + (description != null ? description.hashCode() : 0);
result = 31 * result + (url != null ? url.hashCode() : 0);
return result;
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy