/*
If the value is too small, it will be overwritten by {@link #MIN_PERIOD}
(non-Javadoc)
@see com.github.thehilikus.jrobocom.timing.Clock#setPeriod(int)
15960
@Override
    public void setPeriod(int pPeriod) {
	if (pPeriod < 0) {
	    throw new IllegalArgumentException("Period cannot be negative");
	}
	int actual = Math.max(pPeriod, MIN_PERIOD);
	log.debug("Changing clock period to {}", actual);
	period = actual;

	if (isRunning()) {
	    stop();
	    start(false);
	}
    }
366088
public static void setMinTime(int mintime) {
    System.setProperty(MIN_TIME, String.valueOf(mintime));
    TimerTrace.mintime = mintime;
  }
795233
@Override
    public void setSetWaitTimeInMessage(boolean setWaitTime)
    {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.entry(tc, "setSetWaitTimeInMessage", Boolean.valueOf(setWaitTime));
        _setWaitTimeInMessage = setWaitTime;
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.exit(tc, "setSetWaitTimeInMessage");
    }
306827
public void setDateMin(Date dateMin) {
        this.dateMin = dateMin;

        if (isAttached() && dateMin != null) {
            getPicker().set("min", JsDate.create((double) dateMin.getTime()));
        }
    }
403008
public void setMinMax(int min, int max)
    {
        if(min >= max)
            throw new IllegalArgumentException("The input minimum (" + min + ") must be less than the given max (" + max  + ")");
        this.min = min;
        this.max = max;
    }
703342
private void setPeriodInternal(ReadablePeriod period) {
        int[] newValues = new int[size()];
        for (int i = 0, isize = period.size(); i < isize; i++) {
            DurationFieldType type = period.getFieldType(i);
            int value = period.getValue(i);
            checkAndUpdate(type, newValues, value);
        }
        setValues(newValues);
    }
125291
public void setIdleMin(int min)
  {
    if (min == _idleMin) {
      // avoid update() overhead if unchanged
      return;
    }
    
    if (min <= 0) {
      min = DEFAULT_IDLE_MIN;
    }
    
    if (_threadMax < min)
      throw new ConfigException(L.l("IdleMin ({0}) must be less than ThreadMax ({1})", min, _threadMax));
    if (min <= 0)
      throw new ConfigException(L.l("IdleMin ({0}) must be greater than 0.", min));

    _idleMin = min;
    
    update();
  }
769934
@Override
	public void setY(double min, double max) {
		if (min <= max) {
			this.minyProperty.set(min);
			this.maxyProperty.set(max);
		} else {
			this.minyProperty.set(max);
			this.maxyProperty.set(min);
		}
	}
330733
public static void validatePeriod(Duration period) {
		if(period.equals(Duration.ZERO)) {
			String message = "The period must be nonzero";
			throw new IllegalArgumentException(message);
		}
	}
291947
@Override
	public void setX(double min, double max) {
		if (min <= max) {
			this.minxProperty.set(min);
			this.maxxProperty.set(max);
		} else {
			this.minxProperty.set(max);
			this.maxxProperty.set(min);
		}
	}
175688
public void setRolloverPeriod(Duration period)
  {
    _rolloverPeriod = period.toMillis();

    if (_rolloverPeriod > 0) {
      _rolloverPeriod += 3600000L - 1;
      _rolloverPeriod -= _rolloverPeriod % 3600000L;
    }
    else
      _rolloverPeriod = Integer.MAX_VALUE; // Period.INFINITE;
  }
485727
@Override
	public void setZ(double min, double max) {
		if (min <= max) {
			this.minz = min;
			this.maxz = max;
		} else {
			this.minz = max;
			this.maxz = min;
		}
	}
617949
public void setDuration(@NotNull final Duration duration) {
        if (duration.compareTo(MAXIMUM_DURATION) > 0) {
            throw new IllegalArgumentException("The duaration has to be smaller than 23:59:59.");
        }
        super.setValue(durationToDate(duration));
    }
186249
@Override
	public void setY(double min, double max) {
		if (min <= max) {
			this.miny = min;
			this.maxy = max;
		} else {
			this.miny = max;
			this.maxy = min;
		}
	}
1122343
public void setTimeInMillis(long millis) {
        // If we don't need to recalculate the calendar field values,
        // do nothing.
// BEGIN Android-changed: Removed ZoneInfo support
//        if (time == millis && isTimeSet && areFieldsSet && areAllFieldsSet
//            && (zone instanceof ZoneInfo) && !((ZoneInfo)zone).isDirty()) {
        if (time == millis && isTimeSet && areFieldsSet && areAllFieldsSet) {
// END Android-changed: Removed ZoneInfo support

            return;
        }
        time = millis;
        isTimeSet = true;
        areFieldsSet = false;
        computeFields();
        areAllFieldsSet = areFieldsSet = true;
    }
1364859
public void setMin(final T pmin) {
    if (pmin == null) {
      getInputElement().removeAttribute("min");
    } else {
      getInputElement().setMin(this.numberRenderer.render(pmin));
    }
  }
420919
public function set_timeperiod($timeperiod) {
        $map = $this->get_time_period_map();
        foreach ($map as $campus => $periods) {
            if (isset($periods[$timeperiod])) {
                $this->_timeperiod = $timeperiod;
                return;
            }
        }

        throw new \Exception("Invalid time period: '$timeperiod'.");
    }