xy.reflect.ui.control.CustomContext Maven / Gradle / Ivy
package xy.reflect.ui.control;
public class CustomContext implements IContext {
protected String identifier;
public CustomContext(String identifier) {
this.identifier = identifier;
}
@Override
public String getIdentifier() {
return identifier;
}
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + ((identifier == null) ? 0 : identifier.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;
CustomContext other = (CustomContext) obj;
if (identifier == null) {
if (other.identifier != null)
return false;
} else if (!identifier.equals(other.identifier))
return false;
return true;
}
@Override
public String toString() {
return "CustomContext [identifier=" + identifier + "]";
}
}