获取所有候选答案

@return 所有候选答案
341929
public List<CandidateAnswer> getAllCandidateAnswer() {
        Map<String, Double> map = new HashMap<>();
        for (Evidence evidence : evidences) {
            for (CandidateAnswer candidateAnswer : evidence.getCandidateAnswerCollection().getAllCandidateAnswer()) {
                Double score = map.get(candidateAnswer.getAnswer());
                //候选答案的分值和证据的分值 用于计算最终的候选答案分值
                Double candidateAnswerFinalScore = candidateAnswer.getScore() + evidence.getScore();
                if (score == null) {
                    score = candidateAnswerFinalScore;
                } else {
                    score += candidateAnswerFinalScore;
                }
                map.put(candidateAnswer.getAnswer(), score);
            }
        }

        //组装候选答案
        List<CandidateAnswer> candidateAnswers = new ArrayList<>();
        for (Map.Entry<String, Double> entry : map.entrySet()) {
            String answer = entry.getKey();
            Double score = entry.getValue();
            if (answer != null && score != null && score > 0 && score < Double.MAX_VALUE) {
                CandidateAnswer candidateAnswer = new CandidateAnswer();
                candidateAnswer.setAnswer(answer);
                candidateAnswer.setScore(score);
                candidateAnswers.add(candidateAnswer);
            }
        }
        Collections.sort(candidateAnswers);
        Collections.reverse(candidateAnswers);
        //过滤候选答案
        if (candidateAnswerFilter != null) {
            candidateAnswerFilter.filter(this, candidateAnswers);
        }
        //分值归一化
        if (candidateAnswers.size() > 0) {
            double baseScore = candidateAnswers.get(0).getScore();
            for (CandidateAnswer candidateAnswer : candidateAnswers) {
                double score = candidateAnswer.getScore() / baseScore;
                candidateAnswer.setScore(score);
            }
        }

        return candidateAnswers;
    }
1200107
public String[] getAllNames() {
        final List<String> vec = new ArrayList<String>();
        this.getAllNamesAux(vec);
        return vec.toArray(new String[vec.size()]);
    }
435147
public String[] getNames() {
        String[] headers = new String[columns.getColumns().size()];
        for (int i = 0; i < columns.getColumns().size(); i++) {
            headers[i] = columns.getColumns().get(i).getName();
        }
        return headers;
    }
990163
public function all()
    {
        $keys = glob($this->path.'/*.json');
        $data = [];
        foreach ($keys as $key) {
            $data[] = $this->get(basename($key, '.json'));
        }

        return $data;
    }
377846
public List<IfClassAvailable<Exclude<T>>> getAllIfClassAvailable()
   {
      List<IfClassAvailable<Exclude<T>>> list = new ArrayList<IfClassAvailable<Exclude<T>>>();
      List<Node> nodeList = childNode.get("if-class-available");
      for(Node node: nodeList)
      {
         IfClassAvailable<Exclude<T>>  type = new IfClassAvailableImpl<Exclude<T>>(this, "if-class-available", childNode, node);
         list.add(type);
      }
      return list;
   }
1255839
public List<String> getAsStrings() {
        if (this.isEmpty()) {
            return Collections.emptyList();
        } else {
            final List<String> toStringVals = new ArrayList<>(this.size());
            for (final T i : this) {
                toStringVals.add(i == null ? "null" : i.toString());
            }
            return toStringVals;
        }
    }
929768
public ArrayList<String> getArgList(){
		ArrayList<String> ret = new ArrayList<String>();
		String[] ar = StringUtils.split(this.getArgs());
		if(ar!=null){
			for(String s : ar){
				ret.add(StringUtils.trim(s));
			}
		}
		return ret;
	}
642899
public java.util.List<String> getFilterValues() {
        if (filterValues == null) {
            filterValues = new com.amazonaws.internal.SdkInternalList<String>();
        }
        return filterValues;
    }
190112
protected String getToNames() {

        List<String> excluded = new ArrayList<String>();
        List<String> users = new ArrayList<String>();
        Iterator<String> itGroups = getGroups().iterator();
        while (itGroups.hasNext()) {
            String groupName = itGroups.next();
            try {
                Iterator<CmsUser> itUsers = getCms().getUsersOfGroup(groupName, true).iterator();
                while (itUsers.hasNext()) {
                    CmsUser user = itUsers.next();
                    String userName = user.getFullName();
                    if (!users.contains(userName)) {
                        String emailAddress = user.getEmail();
                        if (CmsStringUtil.isNotEmptyOrWhitespaceOnly(emailAddress)) {
                            users.add(userName);
                        } else {
                            excluded.add(userName);
                        }
                    }
                }
            } catch (Exception e) {
                LOG.error(e.getLocalizedMessage(), e);
            }
        }
        if (!excluded.isEmpty()) {
            StringBuffer text = new StringBuffer(500);
            text.append(Messages.get().container(Messages.GUI_EXCLUDED_USERS_WARNING_0).key(getLocale()));
            text.append("<br>");
            Iterator<String> it = excluded.iterator();
            while (it.hasNext()) {
                text.append("- ");
                text.append(it.next());
                text.append("<br>");
            }
            setExcludedUsers(text.toString());
        }
        if (users.isEmpty()) {
            setCommitErrors(
                Collections.singletonList((Throwable)new CmsIllegalStateException(
                    Messages.get().container(Messages.ERR_NO_SELECTED_USER_WITH_EMAIL_0))));
            return "";
        }
        StringBuffer result = new StringBuffer(256);
        Iterator<String> itUsers = users.iterator();
        while (itUsers.hasNext()) {
            result.append(itUsers.next().toString());
            if (itUsers.hasNext()) {
                result.append("; ");
            }
        }
        return result.toString();
    }
704126
public List<Term> getAllTerms() {
        List<Term> ret = new ArrayList<Term>();

        if (terms != null) {
            ret.addAll(terms);
            for (final Term term : terms) {
                ret.addAll(term.getAllTerms());
            }
        }

        return ret;
    }
955257
public CmsHtmlList getList() {

        if ((m_list != null) && (m_list.getMetadata() == null)) {
            m_list.setMetadata(getMetadata(getClass().getName(), m_list.getId()));
        }
        return m_list;
    }
846116
public Collection<String> getNames() {
		Collection<String> names = new HashSet<String>();
		for (InitParam initParam : initParams) {
			names.add(initParam.getName());
		}
		return names;
	}
1016184
public List<T> getAll() {
		List<T> result = new ArrayList<T>();
		if (nodes != null)
			for(Node element : nodes) 
				result.add(getCachedOrNewRepresentation(element));
		return result;
	}
	
	public int size() {
		return nodes.size();
	}
	
	public T get(int index) {
		return getCachedOrNewRepresentation(nodes.get(index));
	}
		
	public Iterator<T> iterator() {
		return getAll().iterator();
	}
}
740691
public function findAll()
	{
		if ( $this->timeout == 0 ) {
			return parent::findAll();
		}

		return $this->searchContext->waitFor($this->timeout, array($this, 'parent::findAll'));
	}
160611
public java.util.List<String> getIamUserArns() {
        if (iamUserArns == null) {
            iamUserArns = new com.amazonaws.internal.SdkInternalList<String>();
        }
        return iamUserArns;
    }
1206447
public String[] getValues() {
        return value == null || value.isEmpty() ? new String[0] : len == 1 ? new String[] { value } : value.split("\\s+");
    }
335811
public List<T> values() {
        List<T> result = new ArrayList<T>();
        for (Iterator<T> itr = iterator(); itr.hasNext(); ) {
            result.add(itr.next());
        }
        return result;
    }