當前位置: 首頁>>代碼示例>>Java>>正文


Java ListUtils.EMPTY_LIST屬性代碼示例

本文整理匯總了Java中org.apache.commons.collections.ListUtils.EMPTY_LIST屬性的典型用法代碼示例。如果您正苦於以下問題:Java ListUtils.EMPTY_LIST屬性的具體用法?Java ListUtils.EMPTY_LIST怎麽用?Java ListUtils.EMPTY_LIST使用的例子?那麽, 這裏精選的屬性代碼示例或許可以為您提供幫助。您也可以進一步了解該屬性所在org.apache.commons.collections.ListUtils的用法示例。


在下文中一共展示了ListUtils.EMPTY_LIST屬性的9個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: getAcceptedDataTypes

/** 
 * The accepted data types of a group item is the same as of the underlying base item.
 * If none is defined, the intersection of all sets of accepted data types of all group
 * members is used instead.
 * 
 * @return the accepted data types of this group item
 */
@SuppressWarnings("unchecked")
public List<Class<? extends State>> getAcceptedDataTypes() {
	if(baseItem!=null) {
		return baseItem.getAcceptedDataTypes();
	} else {
		List<Class<? extends State>> acceptedDataTypes = null;
		
		for(Item item : members) {
			if(acceptedDataTypes==null) {
				acceptedDataTypes = item.getAcceptedDataTypes();
			} else {
				acceptedDataTypes = ListUtils.intersection(acceptedDataTypes, item.getAcceptedDataTypes());
			}
		}
		return acceptedDataTypes == null ? ListUtils.EMPTY_LIST : acceptedDataTypes;
	}
}
 
開發者ID:Neulinet,項目名稱:Zoo,代碼行數:24,代碼來源:GroupItem.java

示例2: getAcceptedCommandTypes

/** 
 * The accepted command types of a group item is the same as of the underlying base item.
 * If none is defined, the intersection of all sets of accepted command types of all group
 * members is used instead.
 * 
 * @return the accepted command types of this group item
 */
@SuppressWarnings("unchecked")
public List<Class<? extends Command>> getAcceptedCommandTypes() {
	if(baseItem!=null) {
		return baseItem.getAcceptedCommandTypes();
	} else {
		List<Class<? extends Command>> acceptedCommandTypes = null;
		
		for(Item item : members) {
			if(acceptedCommandTypes==null) {
				acceptedCommandTypes = item.getAcceptedCommandTypes();
			} else {
				acceptedCommandTypes = ListUtils.intersection(acceptedCommandTypes, item.getAcceptedCommandTypes());
			}
		}
		return acceptedCommandTypes == null ? ListUtils.EMPTY_LIST : acceptedCommandTypes;
	}
}
 
開發者ID:Neulinet,項目名稱:Zoo,代碼行數:24,代碼來源:GroupItem.java

示例3: getUsers

@SuppressWarnings("unchecked")
public List<IUser> getUsers() {
	if(users==null){
		return ListUtils.EMPTY_LIST;
	}
	return users;
}
 
開發者ID:bsteker,項目名稱:bdf2,代碼行數:7,代碼來源:Group.java

示例4: getDepts

@SuppressWarnings("unchecked")
public List<IDept> getDepts() {
	if(depts==null){
		return ListUtils.EMPTY_LIST;
	}
	return depts;
}
 
開發者ID:bsteker,項目名稱:bdf2,代碼行數:7,代碼來源:Group.java

示例5: getPositions

@SuppressWarnings("unchecked")
public List<IPosition> getPositions() {
	if(positions==null){
		return ListUtils.EMPTY_LIST;
	}
	return positions;
}
 
開發者ID:bsteker,項目名稱:bdf2,代碼行數:7,代碼來源:Group.java

示例6: getConceptMappingsToThisTerm

@SuppressWarnings("unchecked")
@ModelAttribute("referenceTermMappingsToThisTerm")
public List<ConceptReferenceTermMap> getConceptMappingsToThisTerm(@ModelAttribute ConceptReferenceTerm conceptReferenceTerm) {
	if (conceptReferenceTerm.getConceptReferenceTermId() != null) {
		return Context.getConceptService().getReferenceTermMappingsTo(conceptReferenceTerm);
	}
	
	return ListUtils.EMPTY_LIST;
}
 
開發者ID:openmrs,項目名稱:openmrs-module-legacyui,代碼行數:9,代碼來源:ConceptReferenceTermFormController.java

示例7: return_empty_list_apache_commons

@Test
public void return_empty_list_apache_commons () {
	
	@SuppressWarnings("unchecked")
	List<String> emptyList = ListUtils.EMPTY_LIST;
	
	assertTrue(emptyList.isEmpty());
}
 
開發者ID:wq19880601,項目名稱:java-util-examples,代碼行數:8,代碼來源:ReturnEmptyList.java

示例8: return_empty_list_apache_commons_exception

/**
 * Used for post example
 */
@SuppressWarnings({"unchecked", "unused" })
private void return_empty_list_apache_commons_exception () {

	DomainObject domain = null; // dao populate domain

	List<String> strings;
	if (domain != null && !CollectionUtils.isEmpty(domain.getStrings())) {
		strings = domain.getStrings();
	} else {
		strings = ListUtils.EMPTY_LIST;
	}

	//...
}
 
開發者ID:wq19880601,項目名稱:java-util-examples,代碼行數:17,代碼來源:ReturnEmptyList.java

示例9: onboardNextPayloads

private List<Payload> onboardNextPayloads(Workspace workspace, PayloadGroup payloadGroup) throws PersistenceException {
    if (payloadGroup == null) {
        return ListUtils.EMPTY_LIST;
    }

    List<Payload> payloads = payloadGroup.getPayloads();
    if (payloads.size() > 0) {
        workspace.addActivePayloads(payloads);
    }

    return payloads;
}
 
開發者ID:Adobe-Consulting-Services,項目名稱:acs-aem-commons,代碼行數:12,代碼來源:SyntheticWorkflowRunnerImpl.java


注:本文中的org.apache.commons.collections.ListUtils.EMPTY_LIST屬性示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。