org.snapscript.core.BooleanValue Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of snap Show documentation
Show all versions of snap Show documentation
Dynamic scripting for the JVM
package org.snapscript.core;
public class BooleanValue extends Value {
public static final BooleanValue TRUE = new BooleanValue(true);
public static final BooleanValue FALSE = new BooleanValue(false);
private final Boolean value;
public BooleanValue(Boolean value) {
this.value = value;
}
@Override
public Class getType() {
return Boolean.class;
}
@Override
public Boolean getValue(){
return value;
}
@Override
public void setValue(Object value){
throw new InternalStateException("Illegal modification of value");
}
@Override
public String toString() {
return String.valueOf(value);
}
}