code: public static Object convertToJava(Value value) {
          switch (value.getType()) {
              case STRING:
                  return ((StringValue) value).get();
              case BOOLEAN:
                  return ((BooleanValue) value).get();
              case NUMBER:
                  return ((NumberValue) value).get();
              case DATE:
                  return ((DateValue) value).get();
              case NIL:
                  return null;
              case OBJECT:
                  return value.get();
          }
          throw new CommandExecutionException("Could not convert value " + value + " to an equivalent Java object");
      }
docs: Converts a srec value to a Java object.
  
  @param value The value
  @return The Java object