当前位置: 首页>>代码示例>>Java>>正文


Java Collections.EMPTY_LIST属性代码示例

本文整理汇总了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;
}
 
开发者ID:rockscript,项目名称:rockscript,代码行数:18,代码来源:EventsQuery.java

示例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;
}
 
开发者ID:ampool,项目名称:monarch,代码行数:15,代码来源:FilterProfile.java

示例3: ChainingMetadataProvider

/** Constructor. */
public ChainingMetadataProvider() {
    super();
    observers = new CopyOnWriteArrayList<Observer>();
    providers = Collections.EMPTY_LIST;
    providerLock = new ReentrantReadWriteLock(true);
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:7,代码来源:ChainingMetadataProvider.java

示例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;
}
 
开发者ID:zhaojunfei,项目名称:lemon,代码行数:15,代码来源:UserDetailsBuilder.java

示例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();
        }
    }
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:29,代码来源:ClassesListController.java

示例6: generate

@Override
public Set<FileObject> generate() throws IOException {
    preGenerate();

    insertSaasServiceAccessCode(isInBlock(getTargetDocument()));
    //addImportsToTargetFile();

    finishProgressReporting();

    return new HashSet<FileObject>(Collections.EMPTY_LIST);
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:11,代码来源:SoapClientPojoCodeGenerator.java

示例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);
    }
}
 
开发者ID:Microsoft,项目名称:azure-maven-plugins,代码行数:44,代码来源:Utils.java

示例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;
    }
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:19,代码来源:StaticPKIXValidationInformationResolver.java

示例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;
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:35,代码来源:SyntaxUpdateTokens.java

示例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());
}
 
开发者ID:servicecatalog,项目名称:oscm,代码行数:9,代码来源:CustomerDataTest.java

示例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;
}
 
开发者ID:Twelvelines,项目名称:AndroidMuseumBleManager,代码行数:8,代码来源:ConnectRequestQueue.java

示例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;
  }

}
 
开发者ID:dremio,项目名称:dremio-oss,代码行数:13,代码来源:SubSchemaWrapper.java

示例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;
}
 
开发者ID:kranthi0987,项目名称:easyfilemanager,代码行数:7,代码来源:MultiMap.java

示例14: getAssociationSets

/**
 * @return a list of association sets (defaults to empty list).
 */
public List<AssociationSet> getAssociationSets()
{
   return Collections.EMPTY_LIST;
}
 
开发者ID:SentinelDataHub,项目名称:dhus-core,代码行数:7,代码来源:AbstractEntitySet.java

示例15: getAllDurableClientCqs

@Override
public List<String> getAllDurableClientCqs(ClientProxyMembershipID clientProxyId)
    throws CqException {
  return Collections.EMPTY_LIST;
}
 
开发者ID:ampool,项目名称:monarch,代码行数:5,代码来源:MissingCqService.java


注:本文中的java.util.Collections.EMPTY_LIST属性示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。