All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.github.stefanbirkner.noprimitives.generator.class.template Maven / Gradle / Ivy

There is a newer version: 0.2.0
Show newest version
#package

public class #wrapper {
	private final #basicTypeClass #fieldName;

	public static #wrapper #fieldName(#basicTypeClass #fieldName) {
		return (#fieldName == null) ? null : new #wrapper(#fieldName);
	}

	public #wrapper(#basicTypeClass #fieldName) {
		if (#fieldName == null)
			throw new IllegalArgumentException("Cannot wrap null.");
		this.#fieldName = #fieldName;
	}

	public #basicType #nameOfValueMethod() {
		return #fieldName;
	}

	@Override
	public int hashCode() {
		return #fieldName.hashCode();
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		#wrapper other = (#wrapper) obj;
		return (#fieldName.equals(other.#fieldName));
	}

	@Override
	public String toString() {
		return #fieldName.toString();
	}
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy