本文整理汇总了Java中java.util.Collections.EMPTY_LIST属性的典型用法代码示例。如果您正苦于以下问题:Java Collections.EMPTY_LIST属性的具体用法?Java Collections.EMPTY_LIST怎么用?Java Collections.EMPTY_LIST使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类java.util.Collections
的用法示例。
在下文中一共展示了Collections.EMPTY_LIST属性的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: execute
@Override
public List<ExecutionEvent> execute(Engine engine) {
BadRequestException.throwIfNull(scriptExecutionId, "scriptExecutionId is a required parameter");
List<ExecutionEvent> events = engine
.getScriptExecutionStore()
.findEventsByScriptExecutionId(scriptExecutionId);
if (minIndex!=null && minIndex>0) {
if (minIndex<events.size()) {
events = events.subList(minIndex, events.size());
} else {
events = Collections.EMPTY_LIST;
}
}
return events;
}
示例2: removeQueuedFilterProfileMsgs
/**
* Removes the filter profile messages from the queue that are received while the members cache
* profile exchange was in progress.
*
* @param member whose messages are returned.
* @return filter profile messages that are queued for the member.
*/
public List removeQueuedFilterProfileMsgs(InternalDistributedMember member) {
synchronized (this.filterProfileMsgQueue) {
if (this.filterProfileMsgQueue.containsKey(member)) {
return new LinkedList(this.filterProfileMsgQueue.remove(member));
}
}
return Collections.EMPTY_LIST;
}
示例3: ChainingMetadataProvider
/** Constructor. */
public ChainingMetadataProvider() {
super();
observers = new CopyOnWriteArrayList<Observer>();
providers = Collections.EMPTY_LIST;
providerLock = new ReentrantReadWriteLock(true);
}
示例4: loadUserAuthorities
protected Collection<GrantedAuthority> loadUserAuthorities(List<String> list) {
if ((list == null) || list.isEmpty()) {
logger.debug("no authorities");
return Collections.EMPTY_LIST;
}
Set<GrantedAuthority> authsSet = new HashSet<GrantedAuthority>();
for (String str : list) {
authsSet.add(new SimpleGrantedAuthority(str));
}
return authsSet;
}
示例5: getContextSubclasses
@NbBundle.Messages("ClassesListController_AnalyzingClassesMsg=Analyzing classes...")
private static Collection getContextSubclasses(Heap heap, String className, Lookup.Provider project) {
ProgressHandle pHandle = null;
try {
pHandle = ProgressHandle.createHandle(Bundle.ClassesListController_AnalyzingClassesMsg());
pHandle.setInitialDelay(0);
pHandle.start();
HashSet subclasses = new HashSet();
SourceClassInfo sci = ProfilerTypeUtils.resolveClass(className, project);
Collection<SourceClassInfo> impls = sci != null ? sci.getSubclasses() : Collections.EMPTY_LIST;
for (SourceClassInfo ci : impls) {
JavaClass jClass = heap.getJavaClassByName(ci.getQualifiedName());
if ((jClass != null) && subclasses.add(jClass)) { // instanceof approach rather than subclassof
subclasses.addAll(jClass.getSubClasses());
}
}
return subclasses;
} finally {
if (pHandle != null) {
pHandle.finish();
}
}
}
示例6: generate
@Override
public Set<FileObject> generate() throws IOException {
preGenerate();
insertSaasServiceAccessCode(isInBlock(getTargetDocument()));
//addImportsToTargetFile();
finishProgressReporting();
return new HashSet<FileObject>(Collections.EMPTY_LIST);
}
示例7: copyResources
/**
* Copy resources to target directory using Maven resource filtering so that we don't have to handle
* recursive directory listing and pattern matching.
* In order to disable filtering, the "filtering" property is force set to False.
*
* @param project
* @param session
* @param filtering
* @param resources
* @param targetDirectory
* @throws IOException
*/
public static void copyResources(final MavenProject project, final MavenSession session,
final MavenResourcesFiltering filtering, final List<Resource> resources,
final String targetDirectory) throws IOException {
for (final Resource resource : resources) {
resource.setTargetPath(Paths.get(targetDirectory, resource.getTargetPath()).toString());
resource.setFiltering(false);
}
final MavenResourcesExecution mavenResourcesExecution = new MavenResourcesExecution(
resources,
new File(targetDirectory),
project,
"UTF-8",
null,
Collections.EMPTY_LIST,
session
);
// Configure executor
mavenResourcesExecution.setEscapeWindowsPaths(true);
mavenResourcesExecution.setInjectProjectBuildFilters(false);
mavenResourcesExecution.setOverwrite(true);
mavenResourcesExecution.setIncludeEmptyDirs(false);
mavenResourcesExecution.setSupportMultiLineFiltering(false);
// Filter resources
try {
filtering.filterResources(mavenResourcesExecution);
} catch (MavenFilteringException ex) {
throw new IOException("Failed to copy resources", ex);
}
}
示例8: StaticPKIXValidationInformationResolver
/**
* Constructor.
*
* @param info list of PKIX validation information to return
* @param names set of trusted names to return
*/
public StaticPKIXValidationInformationResolver(List<PKIXValidationInformation> info, Set<String> names) {
if (info != null) {
pkixInfo = new ArrayList<PKIXValidationInformation>(info);
} else {
pkixInfo = Collections.EMPTY_LIST;
}
if (names != null) {
trustedNames = new HashSet<String>(names);
} else {
trustedNames = Collections.EMPTY_SET;
}
}
示例9: getTokenInfoList
/**
* Create list of tokens of interest for the whole document.
* <br>
* Document is readlocked during this operation.
*
* @param doc document for which the list of tokens is being retrieved.
* @return list of {@link TokenInfo}s describing the tokens of interest
* throughout the whole document.
*/
public static List getTokenInfoList(Document doc) {
SyntaxUpdateTokens suTokens = (SyntaxUpdateTokens)doc.getProperty(SyntaxUpdateTokens.class);
if (suTokens == null || !(doc instanceof BaseDocument)) {
return Collections.EMPTY_LIST;
}
List tokenList;
BaseDocument bdoc = (BaseDocument)doc;
bdoc.readLock();
try {
suTokens.syntaxUpdateStart();
try {
bdoc.getSyntaxSupport().tokenizeText(
new AllTokensProcessor(suTokens), 0, bdoc.getLength(), true);
} catch (BadLocationException e) {
ErrorManager.getDefault().notify(ErrorManager.INFORMATIONAL, e);
} finally {
tokenList = suTokens.syntaxUpdateEnd();
}
} finally {
bdoc.readUnlock();
}
return tokenList;
}
示例10: getSubscriptionKeys_empty
/**
* No error must occur one empty list
*/
@Test
public void getSubscriptionKeys_empty() {
@SuppressWarnings("unchecked")
CustomerData data = new CustomerData(Collections.EMPTY_LIST);
assertTrue(data.getSubscriptionKeys().isEmpty());
}
示例11: getAllDevice
public List<String> getAllDevice(){
if (macMap.size() <= 0) return Collections.EMPTY_LIST;
List<String> list = new ArrayList<>();
for (String key:macMap.keySet()){
list.add(key);
}
return list;
}
示例12: getSubPartitions
@Override
public Iterable<String> getSubPartitions(String table,
List<String> partitionColumns,
List<String> partitionValues
) throws PartitionNotFoundException {
Schema defaultSchema = getDefaultSchema();
if (defaultSchema instanceof AbstractSchema) {
return ((AbstractSchema) defaultSchema).getSubPartitions(table, partitionColumns, partitionValues);
} else {
return Collections.EMPTY_LIST;
}
}
示例13: get
/**
* Gets the list of values associated with each key.
*/
public List<V> get(K key) {
List<V> list = mInternalMap.get(key);
return list == null ? Collections.EMPTY_LIST : list;
}
示例14: getAssociationSets
/**
* @return a list of association sets (defaults to empty list).
*/
public List<AssociationSet> getAssociationSets()
{
return Collections.EMPTY_LIST;
}
示例15: getAllDurableClientCqs
@Override
public List<String> getAllDurableClientCqs(ClientProxyMembershipID clientProxyId)
throws CqException {
return Collections.EMPTY_LIST;
}