當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。