本文整理汇总了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;
}