package melcoe.xacml.pdp.data; public class DocumentInfo { private String name; private String content; public DocumentInfo() { // Default constructor } public DocumentInfo(String name, String content) { this.name = name; this.content = content; } /** * @return the content */ public String getContent() { return content; } /** * @param content * the content to set */ public void setContent(String content) { this.content = content; } /** * @return the name */ public String getName() { return name; } /** * @param name * the name to set */ public void setName(String name) { this.name = name; } /* * (non-Javadoc) * @see java.lang.Object#hashCode() */ @Override public int hashCode() { final int PRIME = 31; int result = 1; result = PRIME * result + (content == null ? 0 : content.hashCode()); result = PRIME * result + (name == null ? 0 : name.hashCode()); return result; } /* * (non-Javadoc) * @see java.lang.Object#equals(java.lang.Object) */ @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (getClass() != obj.getClass()) { return false; } final DocumentInfo other = (DocumentInfo) obj; if (content == null) { if (other.content != null) { return false; } } else if (!content.equals(other.content)) { return false; } if (name == null) { if (other.name != null) { return false; } } else if (!name.equals(other.name)) { return false; } return true; } }