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

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

The newest version!
package prompto.debug.variable;

import java.util.Objects;

import prompto.debug.value.LeanValue;

public class LeanVariable extends VariableBase {

	LeanValue value;
	
	public LeanVariable() {
	}
	
	public LeanVariable(IVariable variable) {
		super(variable);
		this.value = new LeanValue(variable.getValue());
	}

	public void setValue(LeanValue value) {
		this.value = value;
	}
	
	@Override
	public LeanValue getValue() {
		return value;
	}

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

	@Override
	public boolean equals(Object other) {
		return this == other || (other instanceof LeanVariable && ((LeanVariable)other).equals(this));
	}
	
	public boolean equals(LeanVariable other) {
		return Objects.equals(value, other.value) && super.equals(other);
	}

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy