import java.util.Objects;

public class HashCodeEquals {
	private String aString;

	@Override
	public int hashCode() {
		return Objects.hash(aString);
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj) {
			return true;
		}
		if (obj == null) {
			return false;
		}
		if (!(obj instanceof HashCodeEquals)) {
			return false;
		}
		HashCodeEquals other = (HashCodeEquals) obj;
		return Objects.equals(aString, other.aString);
	}
}
