public final void setMaxPriority(int n) { checkAccess();  if (n < Thread.MIN_PRIORITY || n > Thread.MAX_PRIORITY) throw new IllegalArgumentException("Invalid priority: " + n);  if (parent != null && n > parent.maxPriority) n = parent.maxPriority;  maxPriority = n;  Enumeration e = groups.elements(); while (e.hasMoreElements()) { ThreadGroup g = (ThreadGroup) e.nextElement(); g.setMaxPriority(n); }
public final synchronized void setMaxPriority(int maxpri) { checkAccess(); if (maxpri < Thread.MIN_PRIORITY || maxpri > Thread.MAX_PRIORITY) return; if (parent != null && maxpri > parent.maxpri) maxpri = parent.maxpri; this.maxpri = maxpri; if (groups == null) return; int i = groups.size(); while (--i >= 0) ((ThreadGroup) groups.get(i)).setMaxPriority(maxpri);
	public final void setMaxPriority(int n) {		checkAccess();		if (n < Thread.MIN_PRIORITY || n > Thread.MAX_PRIORITY)			throw new IllegalArgumentException("Invalid priority: " + n);		if (parent != null && n > parent.maxPriority)			n = parent.maxPriority;		maxPriority = n;		Enumeration e = groups.elements();		while (e.hasMoreElements()) {			ThreadGroup g = (ThreadGroup) e.nextElement();			g.setMaxPriority(n);		}	}