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

org.snapscript.core.BooleanValue Maven / Gradle / Ivy


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);
   }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy