本文整理汇总了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());
}
示例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();
}
示例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;
}
示例4: iterator
import com.google.common.collect.Iterators; //导入方法依赖的package包/类
@Override
public Iterator<LogicalOperator> iterator() {
return Iterators.emptyIterator();
}
示例5: iterator
import com.google.common.collect.Iterators; //导入方法依赖的package包/类
@Override
public Iterator<LogicalExpression> iterator() {
return Iterators.emptyIterator();
}
示例6: getFolderIterator
import com.google.common.collect.Iterators; //导入方法依赖的package包/类
@Override
public UnmodifiableIterator<URI> getFolderIterator(URI folderLocation) {
return Iterators.emptyIterator();
}
示例7: iterator
import com.google.common.collect.Iterators; //导入方法依赖的package包/类
@Override
public Iterator<PhysicalOperator> iterator() {
return Iterators.emptyIterator();
}
示例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());
}
}
}
示例9: iterator
import com.google.common.collect.Iterators; //导入方法依赖的package包/类
@Override
public Iterator<Prel> iterator() {
return Iterators.emptyIterator();
}
示例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());
}