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

com.kazurayam.ks.globalvariable.xml.GlobalVariableEntity.groovy Maven / Gradle / Ivy

There is a newer version: 2.1.0
Show newest version
package com.kazurayam.ks.globalvariable.xml

public final class GlobalVariableEntity {
	
	private String description
	private String initValue
	private String name
	
	GlobalVariableEntity() {
		this.description = ""
		this.initValue = ""
		this.name = ""
	}
	GlobalVariableEntity description(String description) {
		this.description = description ?: ""
		return this
	}
	GlobalVariableEntity initValue(String initValue) {
		this.initValue = initValue ?: ""
		return this
	}
	GlobalVariableEntity name(String name) {
		this.name = name ?: ""
		return this
	}
	String description() {
		return description
	}
	String initValue() {
		return initValue
	}

	String name() {
		return name
	}

	@Override
	String toString() {
		StringBuilder sb = new StringBuilder()
		sb.append("")
		sb.append("${description}")
		sb.append("${initValue}")
		sb.append("${name}")
		sb.append("")
		return sb.toString()
	}

	@Override
	boolean equals(Object obj) {
		if (!(obj instanceof GlobalVariableEntity)) {
			return false
		}
		GlobalVariableEntity other = (GlobalVariableEntity)obj
		return this.name() == other.name() &&
				this.initValue() == other.initValue() &&
				this.description() == other.description()
	}

	@Override
	int hashCode() {
		return this.name().hashCode()
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy