本文整理匯總了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;
}
}
示例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;
}
}
示例3: getUsers
@SuppressWarnings("unchecked")
public List<IUser> getUsers() {
if(users==null){
return ListUtils.EMPTY_LIST;
}
return users;
}
示例4: getDepts
@SuppressWarnings("unchecked")
public List<IDept> getDepts() {
if(depts==null){
return ListUtils.EMPTY_LIST;
}
return depts;
}
示例5: getPositions
@SuppressWarnings("unchecked")
public List<IPosition> getPositions() {
if(positions==null){
return ListUtils.EMPTY_LIST;
}
return positions;
}
示例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;
}
示例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());
}
示例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;
}
//...
}
示例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;
}