Creates a Priority attribute with the specified priority value

@param priority
the priority value
@return the created PriorityAttribute
@throws IllegalArgumentException
if priority < 0 or priority > (2^31 - 1)
972515
public static PriorityAttribute createPriorityAttribute(long priority)
			throws IllegalArgumentException {
		PriorityAttribute attribute = new PriorityAttribute();

		attribute.setPriority(priority);

		return attribute;
	}
239728
public static <S extends Storable> Comparator<S>
        createComparator(OrderedProperty<S>... properties)
    {
        if (properties == null || properties.length == 0 || properties[0] == null) {
            throw new IllegalArgumentException();
        }

        Class<S> type = properties[0].getChainedProperty().getPrimeProperty().getEnclosingType();

        BeanComparator bc = BeanComparator.forClass(type);

        for (OrderedProperty<S> property : properties) {
            if (property == null) {
                throw new IllegalArgumentException();
            }
            bc = orderBy(bc, property);
        }

        return bc;
    }
344573
public TldAttributeType<TagType<T>> getOrCreateAttribute()
   {
      List<Node> nodeList = childNode.get("attribute");
      if (nodeList != null &&  nodeList.size() > 0)
      {
         return new TldAttributeTypeImpl<TagType<T>>(this, "attribute", childNode, nodeList.get(0));
      }
      return createAttribute();
   }
572971
protected void setPriority(int priority)
   {
      if (tc.isEntryEnabled()) SibTr.entry(this, tc, "setPriority", ""+priority);
      this.priority = priority;
      if (tc.isEntryEnabled()) SibTr.exit(this, tc, "setPriority");      
   }
788803
public final synchronized void setPriority(byte priority) {
		if (this.priority == priority) return;
		if (status == STATUS_STARTED_READY) {
			if (manager.remove(this)) {
				this.priority = priority;
				while (manager.getTransferTarget() != null)
					manager = manager.getTransferTarget();
				manager.addReady(this);
				return;
			}
		}
		this.priority = priority;
	}
78943
public static PrioritizationStrategy getPrioritizationStrategy(String attributeValue) throws StrategyException {
        TaskInstanceStrategyFactory factory = getInstance();
        String className = factory.getStrategyClassName(attributeValue, StrategyType.PrioritizationStrategy);
        PrioritizationStrategy strategy = (PrioritizationStrategy) factory.getStrategyInstance(PrioritizationStrategy.class, className, null);
        return strategy;
    }
43668
public final Object start(int priority)
    {
        started_date = new Date();

        if (parent_process != null || in_process)
        {
            return_object = null;

            doRun();

            return return_object;
        }

        if (thread_pool != null)
        {
            try
            {
                synchronized (thread_set_mutex)
                {
                    thread = (Thread)thread_pool.borrowObject();

                    synchronized (pool_borrow_mutex)
                    {
                        ((WorkerThread)thread).execute(this, pool_mutex);
                        try {
                            pool_borrow_mutex.wait();
                        }
                        catch (InterruptedException ie) {}
                    }
                }

            }
            catch (Exception e)
            {
                throw new QueujException(e);
            }
        }
        else
        {
            // Do not check that the Thread is null first.
            synchronized (thread_set_mutex)
            {
                thread = new Thread(this);
            }
            if (name == null)
                thread.setName("BackgroundProcess - " + thread.getName());
            else
                thread.setName (name);
            thread.setPriority(priority);
            thread.setDaemon(true);
            thread.start();
        }

        return null;
    }
476796
public T defaultPriority(Double priority) {
		if (priority < 0.0 || priority > 1.0) {
			throw new InvalidPriorityException("Priority must be between 0 and 1.0");
		}
		defaultPriority = priority;
		return getThis();
	}
101793
protected weka.core.Attribute wekaAttribute(int index, Attribute attribute) {
        weka.core.Attribute wekaAttribute;
        if (attribute.isNominal()) {
            wekaAttribute = new weka.core.Attribute(attribute.name(), attribute.getAttributeValues(), index);
          
        } else {
            wekaAttribute = new weka.core.Attribute(attribute.name(), index);
        }
        //System.out.println(wekaAttribute.name());
        //System.out.println(wekaAttribute.isNominal());
        return wekaAttribute;
    }
1303246
public AttrReq addAttrReq(String name) throws InvalidArgumentException {
        if (name == null || name.isEmpty()) {
            throw new InvalidArgumentException("name may not be null or empty.");

        }
        return new AttrReq(name);
    }
703022
public void setPriority(int priority) throws IllegalArgumentException {
        if (priority < Thread.MIN_PRIORITY || priority > Thread.MAX_PRIORITY) {
            throw new IllegalArgumentException
                ("Priority out of range: " + priority);
        }

        synchronized (mPool) {
            mPriority = priority;
        }
    }
592191
function createPriority() {
    $cnt = count( $this->priority );
    if( 0 >= $cnt )
      return;
    $attributes = $this->_createParams( $this->priority['params'] );
    return $this->_createElement( 'PRIORITY', $attributes, $this->priority['value'] );
  }
160151
def priority=(new_val)
      return nil if new_val == @priority
      new_val = DEFAULT_PRIORITY if new_val.to_s.empty?
      raise JSS::InvalidDataError, ':priority must be an integer from 1-20' unless PRIORITIES.include? new_val
      @priority = new_val
      @need_to_update = true
    end
383093
public final T setAttributeValueAsInteger(String name, int value) {
    setAttribute(name, Integer.toString(value));
    return (T)this;
  }
1207531
public static Integer getPriority(Class<?> type) {
		if (priorityAnnotationType != null) {
			Annotation priority = AnnotationUtils.findAnnotation(type, priorityAnnotationType);
			if (priority != null) {
				return (Integer) AnnotationUtils.getValue(priority);
			}
		}
		return null;
	}
121277
public Attribute attribute(int indexAttribute) {
        if (this.attributes == null) {
            //All attributes are numeric
            return defaultNumericAttribute();
        }
        int location = locateIndex(indexAttribute);
        if (location == -1) {
            //if there is not attribute information, it is numeric
            return defaultNumericAttribute();
        }
        return attributes[location];
    }
413158
function( priority ) {
			var rules = this.rules,
				len = rules.length,
				i = len - 1;

			// Search from the end, because usually rules will be added with default priority, so
			// we will be able to stop loop quickly.
			while ( i >= 0 && priority < rules[ i ].priority )
				i--;

			return i + 1;
		}