public static Stella_Object accessDimNumberSlotValue(DimNumber self, Symbol slotname, Stella_Object value, boolean setvalueP) {
    if (slotname == Utilities.SYM_UTILITIES_PID) {
      if (setvalueP) {
        self.pid = ((Ratio)(value));
      }
      else {
        value = self.pid;
      }
    }
    else if (slotname == Utilities.SYM_UTILITIES_MAGNITUDE) {
      if (setvalueP) {
        self.magnitude = ((FloatWrapper)(value)).wrapperValue;
      }
      else {
        value = FloatWrapper.wrapFloat(self.magnitude);
      }
    }
    else if (slotname == Utilities.SYM_UTILITIES_PREFERRED_UNITS) {
      if (setvalueP) {
        self.preferredUnits = ((StringWrapper)(value)).wrapperValue;
      }
      else {
        value = StringWrapper.wrapString(self.preferredUnits);
      }
    }
    else {
      { OutputStringStream stream000 = OutputStringStream.newOutputStringStream();

        stream000.nativeStream.print("`" + slotname + "' is not a valid case option");
        throw ((StellaException)(StellaException.newStellaException(stream000.theStringReader()).fillInStackTrace()));
      }
    }
    return (value);
  }