adds rendition to the list of candidates, if it should be available for resolving
@param candidates
@param rendition
336779
private void addRendition(Set<RenditionMetadata> candidates, Rendition rendition, MediaArgs mediaArgs) {
    // ignore AEM-generated thumbnail renditions unless allowed via mediaargs
    if (!mediaArgs.isIncludeAssetThumbnails() && AssetRendition.isThumbnailRendition(rendition)) {
      return;
    }
    // ignore AEM-generated web renditions unless allowed via mediaargs
    boolean isIncludeAssetWebRenditions = mediaArgs.isIncludeAssetWebRenditions() != null
        ? mediaArgs.isIncludeAssetWebRenditions()
        : true;
    if (!isIncludeAssetWebRenditions && AssetRendition.isWebRendition(rendition)) {
      return;
    }
    RenditionMetadata renditionMetadata = createRenditionMetadata(rendition);
    candidates.add(renditionMetadata);
  }
66934
private VirtualTransformedRenditionMetadata getCropRendition(NavigableSet<RenditionMetadata> candidates) {
    RenditionMetadata original = getOriginalRendition();
    if (original == null) {
      return null;
    }
    Double scaleFactor = getCropScaleFactor();
    CropDimension scaledCropDimension = new CropDimension(
        Math.round(cropDimension.getLeft() * scaleFactor),
        Math.round(cropDimension.getTop() * scaleFactor),
        Math.round(cropDimension.getWidth() * scaleFactor),
        Math.round(cropDimension.getHeight() * scaleFactor));
    return new VirtualTransformedRenditionMetadata(original.getRendition(),
        rotateMapWidth(scaledCropDimension.getWidth(), scaledCropDimension.getHeight()),
        rotateMapHeight(scaledCropDimension.getWidth(), scaledCropDimension.getHeight()),
        scaledCropDimension, rotation);
  }
266652
private void acceptNewState( double fx_candidate ) {
		DMatrixRMaj tmp = x;
		x = x_next;
		x_next = tmp;

		fx = fx_candidate;

		mode = Mode.COMPUTE_DERIVATIVES;
	}
989432
protected void addProjectionToList(Projection propertyProjection, String alias) {
        if (alias != null) {
            projectionList.add(propertyProjection,alias);
        }
        else {
            projectionList.add(propertyProjection);
        }
    }
365575
public function addCandidates($candidates): Matcher
    {
        $candidates = is_array($candidates) ? $candidates : func_get_args();

        Collection::make($candidates)->each(function ($candidate) {
            $this->addCandidate($candidate);
        });

        return $this;
    }
878968
public void add(final String string, final Candidate candidate) {
    checkNotNull(string);
    checkNotNull(candidate);
    candidates.put(string, candidate);
  }
83275
def process(self, candidates):
        
        for c in candidates[:]:
            if c.locator not in self.good_locators:
                # TODO: search string, i.e. find "EU_Street_Name" in "EU_Street_Name.GBR_StreetName"
                candidates.remove(c)

        return candidates
1127055
public static List<RoboconfCompletionProposal> buildProposalsFromMap( Map<String,String> candidates, String prefix ) {

		List<RoboconfCompletionProposal> result = new ArrayList<> ();
		for( Map.Entry<String,String> entry : candidates.entrySet()) {

			// Matching candidate?
			String candidate = entry.getKey();
			if( ! startsWith( candidate, prefix ))
				continue;

			// No description => basic proposal
			if( Utils.isEmptyOrWhitespaces( entry.getValue())) {
				result.add( basicProposal( candidate, prefix ));
			}

			// Otherwise, show the description
			else {
				result.add( new RoboconfCompletionProposal(
						candidate,
						candidate,
						entry.getValue(),
						prefix.length()));
			}
		}

		return result;
	}
1199213
public static Method[] candidateMethods(Class<?> clazz, String name, Class<?>[] argTypes) {
        return candidateMethods(collectMethods(clazz, name), argTypes);
    }
385737
def exclude_candidates(self, candidates, reason):
        

        # put some paranoia around exclusion: we want to make sure that
        # `candidates` is unique, and that none of these candidates have
        # been previously excluded
        for candidate_id in candidates:
            assert(candidate_id not in self.candidates_excluded)
        assert(len(set(candidates)) == len(candidates))

        # determine the paper transfers to be run, and the candidates
        # holding papers which are distributed in each transfer
        transfers_applicable = defaultdict(set)
        for candidate_id in candidates:
            self.candidates_excluded[candidate_id] = True
            for bundle_transaction in self.candidate_bundle_transactions.get(candidate_id):
                value = bundle_transaction.transfer_value
                transfers_applicable[value].add(candidate_id)

        transfer_values = list(reversed(sorted(transfers_applicable)))
        self.results.candidates_excluded(
            CandidatesExcluded(
                candidates=candidates,
                transfer_values=transfer_values,
                reason=reason))

        for transfer_value in transfer_values:
            self.exclusion_distributions_pending.append((list(transfers_applicable[transfer_value]), transfer_value))
1318444
public static Method[] candidateMethods(Method[] methods, Class<?>[] argTypes) {
        return candidates(methods, collectSignatures(methods), collectVarArgs(methods), argTypes);
    }
480673
private void addValidRemoteCandidate(TransportCandidate remoteCandidate) {
        // Add the candidate to the list
        if (remoteCandidate != null) {
            synchronized (validRemoteCandidates) {
                LOGGER.fine("Added valid candidate: " + remoteCandidate.getIp() + ":" + remoteCandidate.getPort());
                validRemoteCandidates.add(remoteCandidate);
            }
        }
    }
539399
public static <E> List<E> refineCandidates(final List<E> candidates, final Predicate<? super E> predicate) {
        if (candidates.size() == 1) {
            return candidates;
        }
        List<E> newCandidates = CollectionUtils.filter(candidates, predicate);
        if (newCandidates.isEmpty()) {
            return candidates;
        }
        return newCandidates;
    }
217620
public void add(VerifierComponent descr) {

        if ( subSolver != null ) {
            subSolver.add( descr );
        } else {
            if ( type == OperatorDescrType.AND ) {
                if ( possibilityLists.isEmpty() ) {
                    possibilityLists.add( new HashSet<VerifierComponent>() );
                }
                for ( Set<VerifierComponent> set : possibilityLists ) {
                    set.add( descr );
                }
            } else if ( type == OperatorDescrType.OR ) {
                Set<VerifierComponent> set = new HashSet<VerifierComponent>();
                set.add( descr );
                possibilityLists.add( set );
            }
        }
    }
1107316
public void setEntitiesDetectionJobPropertiesList(java.util.Collection<EntitiesDetectionJobProperties> entitiesDetectionJobPropertiesList) {
        if (entitiesDetectionJobPropertiesList == null) {
            this.entitiesDetectionJobPropertiesList = null;
            return;
        }

        this.entitiesDetectionJobPropertiesList = new java.util.ArrayList<EntitiesDetectionJobProperties>(entitiesDetectionJobPropertiesList);
    }
150663
public void iceCandidatesReceived(JSONArray candidates) {
        if (isActive()) {
            for (int ii = 0; ii < candidates.length(); ii++) {
                try {
                    JSONObject eachCandidate = (JSONObject) candidates.get(ii);
                    String mid = eachCandidate.getString("sdpMid");
                    int sdpLineIndex = eachCandidate.getInt("sdpMLineIndex");
                    String sdp = eachCandidate.getString("candidate");

                    IceCandidate rtcCandidate = new IceCandidate(mid, sdpLineIndex, sdp);

                    try {
                        // Start critical block
                        queuedRemoteCandidatesSemaphore.acquire();

                        if (null != queuedRemoteCandidates) {
                            queuedRemoteCandidates.add(rtcCandidate);
                        } else {
                            peerConnection.addIceCandidate(rtcCandidate);
                        }

                        // End critical block
                        queuedRemoteCandidatesSemaphore.release();
                    } catch (InterruptedException e) {
                        Log.d(TAG, "Error with remote candidates semaphore");
                    }

                } catch (JSONException e) {
                    Log.d(TAG, "Error processing remote ice candidate data");
                }
            }
        }
    }
187641
public function addCandidate ($candidate_id = null) : Candidate
    {
        // only if the vote has not started
        if ( $this->_State > 1 ) :
            throw new CondorcetException(2);
        endif;

        // Filter
        if ( is_bool($candidate_id) || is_array($candidate_id) || (is_object($candidate_id) && !($candidate_id instanceof Candidate)) ) :
            throw new CondorcetException(1, $candidate_id);
        endif;


        // Process
        if ( empty($candidate_id) ) :
            while ( !$this->canAddCandidate($this->_i_CandidateId) ) :
                $this->_i_CandidateId++;
            endwhile;

            $newCandidate = new Candidate($this->_i_CandidateId);
        else : // Try to add the candidate_id
            $newCandidate = ($candidate_id instanceof Candidate) ? $candidate_id : new Candidate ((string) $candidate_id);

            if ( !$this->canAddCandidate($newCandidate) ) :
                throw new CondorcetException(3,$candidate_id);
            endif;
        endif;

        // Register it
        $this->_Candidates[] = $newCandidate;

        // Linking
        $newCandidate->registerLink($this);

        // Disallow other candidate object name matching 
        $newCandidate->setProvisionalState(false);

        return $newCandidate;
    }