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

prompto.debug.variable.VariableBase Maven / Gradle / Ivy

The newest version!
package prompto.debug.variable;

import java.util.Objects;

@SuppressWarnings("unchecked")
public abstract class VariableBase implements IVariable {

	String name;
	String typeName;
	
	public VariableBase() {
	}
	
	public VariableBase(String name, String typeName) {
		this.name = name;
		this.typeName = typeName;
	}
	
	public VariableBase(IVariable variable) {
		this.name = variable.getName();
		this.typeName = variable.getTypeName();
	}

	public void setName(String name) {
		this.name = name;
	}
	
	@Override
	public String getName() {
		return name;
	}
	
	public void setTypeName(String typeName) {
		this.typeName = typeName;
	}
	
	@Override
	public String getTypeName() {
		return typeName;
	}
	
	public  T withName(String name) {
		this.name = name;
		return (T)this;
	}
	
	public  T withTypeName(String typeName) {
		this.typeName = typeName;
		return (T)this;
	}
	
	public boolean equals(VariableBase other) {
		return Objects.equals(name, other.name) && Objects.equals(typeName, other.typeName);
	}

	

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy