59 lines
1.3 KiB
Java
59 lines
1.3 KiB
Java
package eu.univento.core.api.items;
|
|
|
|
/**
|
|
* @author joethei
|
|
* @version 0.1
|
|
*/
|
|
public class Page {
|
|
private String pageName;
|
|
private String pageTitle;
|
|
|
|
public Page(final String pageName) {
|
|
this(pageName, pageName);
|
|
}
|
|
|
|
public Page(final String pageName, final String pageDisplayTitle) {
|
|
this.pageTitle = pageDisplayTitle;
|
|
this.pageName = pageName;
|
|
}
|
|
|
|
@Override
|
|
public boolean equals(final Object obj) {
|
|
if (this == obj) {
|
|
return true;
|
|
}
|
|
if (obj == null) {
|
|
return false;
|
|
}
|
|
if (this.getClass() != obj.getClass()) {
|
|
return false;
|
|
}
|
|
final Page other = (Page)obj;
|
|
return this.getPageName().equals(other.getPageName());
|
|
}
|
|
|
|
public String getPageDisplayTitle() {
|
|
return this.pageTitle;
|
|
}
|
|
|
|
public String getPageName() {
|
|
return this.pageName;
|
|
}
|
|
|
|
@Override
|
|
public int hashCode() {
|
|
final int prime = 31;
|
|
int result = 1;
|
|
result = 31 * result + this.getPageName().hashCode();
|
|
return result;
|
|
}
|
|
|
|
public void setDisplayTitle(final String newTitle) {
|
|
this.pageTitle = newTitle;
|
|
}
|
|
|
|
@Override
|
|
public String toString() {
|
|
return "Page[Name=" + this.getPageName() + ", Title=" + this.getPageDisplayTitle() + "]";
|
|
}
|
|
} |