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


Java Iterators.emptyIterator方法代码示例

本文整理汇总了Java中com.google.common.collect.Iterators.emptyIterator方法的典型用法代码示例。如果您正苦于以下问题:Java Iterators.emptyIterator方法的具体用法?Java Iterators.emptyIterator怎么用?Java Iterators.emptyIterator使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.google.common.collect.Iterators的用法示例。


在下文中一共展示了Iterators.emptyIterator方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: nextToken

import com.google.common.collect.Iterators; //导入方法依赖的package包/类
/**
 * Implementation of the {@link TokenSource} interface. Return new tokens as long as there are some, afterwards
 * return {@link Token#EOF_TOKEN}.
 */
@Override
public Token nextToken() {
	if (next != null) {
		Token result = next;
		next = null;
		return result;
	}
	if (!leafNodes.hasNext()) {
		return Token.EOF_TOKEN;
	}
	ILeafNode leaf = leafNodes.next();
	if (leaf.getTotalOffset() >= endOffset) {
		leafNodes = Iterators.emptyIterator();
		return Token.EOF_TOKEN;
	}
	if (leaf.getTotalEndOffset() <= startOffset) {
		return nextToken();
	}
	if (leaf.getTotalEndOffset() > endOffset) {
		return toPrefixToken(leaf);
	}
	SyntaxErrorMessage syntaxErrorMessage = leaf.getSyntaxErrorMessage();
	if (syntaxErrorMessage != null && SEMICOLON_INSERTED.equals(syntaxErrorMessage.getIssueCode())) {
		return toASIToken(leaf);
	}
	if (leaf.isHidden()) {
		return processHiddenToken(leaf);
	}
	int tokenType = tokenTypeMapper.getInternalTokenType(leaf);
	return new CommonToken(tokenType, leaf.getText());
}
 
开发者ID:eclipse,项目名称:n4js,代码行数:36,代码来源:NodeModelTokenSource.java

示例2: getFolderIterator

import com.google.common.collect.Iterators; //导入方法依赖的package包/类
@Override
public UnmodifiableIterator<URI> getFolderIterator(URI folderLocation) {
	final IContainer container;
	if (DIRECT_RESOURCE_IN_PROJECT_SEGMENTCOUNT == folderLocation.segmentCount()) {
		container = workspace.getProject(folderLocation.lastSegment());
	} else {
		container = workspace.getFolder(new Path(folderLocation.toPlatformString(true)));
	}
	if (container != null && container.exists()) {
		final List<URI> result = Lists.newLinkedList();
		try {
			container.accept(new IResourceVisitor() {
				@Override
				public boolean visit(IResource resource) throws CoreException {
					if (resource.getType() == IResource.FILE) {
						result.add(URI.createPlatformResourceURI(resource.getFullPath().toString(), true));
					}
					return true;
				}
			});
			return Iterators.unmodifiableIterator(result.iterator());
		} catch (CoreException e) {
			return Iterators.unmodifiableIterator(result.iterator());
		}
	}
	return Iterators.emptyIterator();
}
 
开发者ID:eclipse,项目名称:n4js,代码行数:28,代码来源:EclipseBasedN4JSWorkspace.java

示例3: DFSInotifyEventInputStream

import com.google.common.collect.Iterators; //导入方法依赖的package包/类
DFSInotifyEventInputStream(Sampler traceSampler, ClientProtocol namenode,
      long lastReadTxid) throws IOException {
  this.traceSampler = traceSampler;
  this.namenode = namenode;
  this.it = Iterators.emptyIterator();
  this.lastReadTxid = lastReadTxid;
}
 
开发者ID:naver,项目名称:hadoop,代码行数:8,代码来源:DFSInotifyEventInputStream.java

示例4: iterator

import com.google.common.collect.Iterators; //导入方法依赖的package包/类
@Override
public Iterator<LogicalOperator> iterator() {
    return Iterators.emptyIterator();
}
 
开发者ID:dremio,项目名称:dremio-oss,代码行数:5,代码来源:SourceOperator.java

示例5: iterator

import com.google.common.collect.Iterators; //导入方法依赖的package包/类
@Override
public Iterator<LogicalExpression> iterator() {
  return Iterators.emptyIterator();
}
 
开发者ID:skhalifa,项目名称:QDrill,代码行数:5,代码来源:ValueExpressions.java

示例6: getFolderIterator

import com.google.common.collect.Iterators; //导入方法依赖的package包/类
@Override
public UnmodifiableIterator<URI> getFolderIterator(URI folderLocation) {
	return Iterators.emptyIterator();
}
 
开发者ID:eclipse,项目名称:n4js,代码行数:5,代码来源:MockWorkspace.java

示例7: iterator

import com.google.common.collect.Iterators; //导入方法依赖的package包/类
@Override
public Iterator<PhysicalOperator> iterator() {
  return Iterators.emptyIterator();
}
 
开发者ID:skhalifa,项目名称:QDrill,代码行数:5,代码来源:MongoSubScan.java

示例8: iterator

import com.google.common.collect.Iterators; //导入方法依赖的package包/类
public Iterator iterator()
{
    if (this.minX == Integer.MIN_VALUE)
    {
        return super.iterator();
    }
    else if (this.size() <= 0)
    {
        return Iterators.emptyIterator();
    }
    else
    {
        int i = this.minX >> 4;
        int j = this.minZ >> 4;
        int k = this.maxX >> 4;
        int l = this.maxZ >> 4;
        List list = new ArrayList();

        for (int i1 = i; i1 <= k; ++i1)
        {
            for (int j1 = j; j1 <= l; ++j1)
            {
                Set set = this.getSubSet(i1, j1, false);

                if (set != null)
                {
                    list.add(set.iterator());
                }
            }
        }

        if (list.size() <= 0)
        {
            return Iterators.emptyIterator();
        }
        else if (list.size() == 1)
        {
            return (Iterator)list.get(0);
        }
        else
        {
            return Iterators.concat(list.iterator());
        }
    }
}
 
开发者ID:SkidJava,项目名称:BaseClient,代码行数:46,代码来源:NextTickHashSet.java

示例9: iterator

import com.google.common.collect.Iterators; //导入方法依赖的package包/类
@Override
public Iterator<Prel> iterator() {
  return Iterators.emptyIterator();
}
 
开发者ID:dremio,项目名称:dremio-oss,代码行数:5,代码来源:ValuesPrel.java

示例10: iterator

import com.google.common.collect.Iterators; //导入方法依赖的package包/类
public Iterator<T> iterator()
{
    return this.values.isEmpty() ? Iterators.<T>emptyIterator() : Iterators.unmodifiableIterator(this.values.iterator());
}
 
开发者ID:F1r3w477,项目名称:CustomWorldGen,代码行数:5,代码来源:ClassInheritanceMultiMap.java


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