Ejemplo n.º 1
0
  public static Stella_Object accessCalendarDateSlotValue(
      CalendarDate self, Symbol slotname, Stella_Object value, boolean setvalueP) {
    if (slotname == Stella.SYM_STELLA_MODIFIED_JULIAN_DAY) {
      if (setvalueP) {
        self.modifiedJulianDay = ((IntegerWrapper) (value)).wrapperValue;
      } else {
        value = IntegerWrapper.wrapInteger(self.modifiedJulianDay);
      }
    } else if (slotname == Stella.SYM_STELLA_TIME_MILLIS) {
      if (setvalueP) {
        self.timeMillis = ((IntegerWrapper) (value)).wrapperValue;
      } else {
        value = IntegerWrapper.wrapInteger(self.timeMillis);
      }
    } else {
      {
        OutputStringStream stream000 = OutputStringStream.newOutputStringStream();

        stream000.nativeStream.print("`" + slotname + "' is not a valid case option");
        throw ((StellaException)
            (StellaException.newStellaException(stream000.theStringReader()).fillInStackTrace()));
      }
    }
    return (value);
  }
Ejemplo n.º 2
0
  public static CalendarDate newCalendarDate() {
    {
      CalendarDate self = null;

      self = new CalendarDate();
      self.timeMillis = Stella.NULL_INTEGER;
      self.modifiedJulianDay = Stella.NULL_INTEGER;
      return (self);
    }
  }
Ejemplo n.º 3
0
  public static CalendarDate makeCalendarDate(int day, int time) {
    while (time < 0) {
      time = time + Stella.MILLIS_PER_DAY;
      day = day - 1;
    }
    while (time > Stella.MILLIS_PER_DAY) {
      time = time - Stella.MILLIS_PER_DAY;
      day = day + 1;
    }
    {
      CalendarDate self000 = CalendarDate.newCalendarDate();

      self000.modifiedJulianDay = day;
      self000.timeMillis = time;
      {
        CalendarDate value000 = self000;

        return (value000);
      }
    }
  }