com.gooddata.md.AttributeElement Maven / Gradle / Ivy
/*
* Copyright (C) 2007-2015, GoodData(R) Corporation. All rights reserved.
*/
package com.gooddata.md;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
/**
* Represent one element of attribute values
*/
@JsonIgnoreProperties(ignoreUnknown = true)
@JsonInclude(JsonInclude.Include.NON_NULL)
public class AttributeElement {
private final String uri;
private final String title;
@JsonCreator
private AttributeElement(@JsonProperty("uri") String uri, @JsonProperty("title") String title) {
this.uri = uri;
this.title = title;
}
public String getUri() {
return uri;
}
public String getTitle() {
return title;
}
@Override
public boolean equals(Object o) {
if (this == o)
return true;
if (!(o instanceof AttributeElement))
return false;
AttributeElement that = (AttributeElement) o;
if (uri != null ? !uri.equals(that.uri) : that.uri != null)
return false;
return !(title != null ? !title.equals(that.title) : that.title != null);
}
@Override
public int hashCode() {
int result = uri != null ? uri.hashCode() : 0;
result = 31 * result + (title != null ? title.hashCode() : 0);
return result;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy