本文整理匯總了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());
}