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


Java Iterators.concat方法代码示例

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


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

示例1: getFileProperties

import com.google.common.collect.Iterators; //导入方法依赖的package包/类
@Override
public SortedSet<TaskOutputFilePropertySpec> getFileProperties() {
    if (fileProperties == null) {
        TaskPropertyUtils.ensurePropertiesHaveNames(filePropertiesInternal);
        Iterator<TaskOutputFilePropertySpec> flattenedProperties = Iterators.concat(Iterables.transform(filePropertiesInternal, new Function<TaskPropertySpec, Iterator<? extends TaskOutputFilePropertySpec>>() {
            @Override
            public Iterator<? extends TaskOutputFilePropertySpec> apply(TaskPropertySpec propertySpec) {
                if (propertySpec instanceof CompositeTaskOutputPropertySpec) {
                    return ((CompositeTaskOutputPropertySpec) propertySpec).resolveToOutputProperties();
                } else {
                    return Iterators.singletonIterator((TaskOutputFilePropertySpec) propertySpec);
                }
            }
        }).iterator());
        fileProperties = TaskPropertyUtils.collectFileProperties("output", flattenedProperties);
    }
    return fileProperties;
}
 
开发者ID:lxxlxx888,项目名称:Reer,代码行数:19,代码来源:DefaultTaskOutputs.java

示例2: iterator

import com.google.common.collect.Iterators; //导入方法依赖的package包/类
@Override
public Iterator<RoutineInfo> iterator() {
    return Iterators.concat(
            builtInAnalyzers(),
            builtInCharFilters(),
            builtInTokenFilters(),
            builtInTokenizers(),
            customIterators()
    );
}
 
开发者ID:baidu,项目名称:Elasticsearch,代码行数:11,代码来源:RoutineInfos.java

示例3: getCompletions

import com.google.common.collect.Iterators; //导入方法依赖的package包/类
@Override
public Iterator<String> getCompletions(ArgumentContext context) {
    String textSoFar = context.text;
    List<String> sections = COMMA_SPLITTER.splitToList(textSoFar);
    String lastSection = Iterables.getLast(sections);
    String prependText = String.join(",", sections.subList(0, sections.size() - 1));
    Iterator<String> integer = Iterators.transform(delegate.getCompletions(context.withText(lastSection)), prependText::concat);
    if (textSoFar.isEmpty() || textSoFar.endsWith(",") || textSoFar.codePoints().filter(cp -> cp == ',').count() >= (dimensions - 1)) {
        return integer;
    }
    return Iterators.concat(integer, Iterators.transform(COMMA.iterator(), textSoFar::concat));
}
 
开发者ID:kenzierocks,项目名称:HardVox,代码行数:13,代码来源:VecArg.java

示例4: getMethods

import com.google.common.collect.Iterators; //导入方法依赖的package包/类
@Nonnull
@Override
public Iterable<? extends Method> getMethods() {
    return new Iterable<Method>() {
        @Nonnull
        @Override
        public Iterator<Method> iterator() {
            return Iterators.concat(getDirectMethods().iterator(), getVirtualMethods().iterator());
        }
    };
}
 
开发者ID:CvvT,项目名称:andbg,代码行数:12,代码来源:ClassDefRewriter.java

示例5: iterator

import com.google.common.collect.Iterators; //导入方法依赖的package包/类
@Override
public Iterator<Mapper> iterator() {
    List<Mapper> extras = new ArrayList<>();
    if (fieldType().isGeoHashEnabled()) {
        extras.add(geoHashMapper);
    }
    if (fieldType().isLatLonEnabled()) {
        extras.add(latMapper);
        extras.add(lonMapper);
    }
    return Iterators.concat(super.iterator(), extras.iterator());
}
 
开发者ID:baidu,项目名称:Elasticsearch,代码行数:13,代码来源:BaseGeoPointFieldMapper.java

示例6: childrenIterator

import com.google.common.collect.Iterators; //导入方法依赖的package包/类
@Override
public Iterator<Tree> childrenIterator() {
  return Iterators.concat(
    Iterators.singletonIterator(openBracket),
    content != null ? content.iterator() : new ArrayList<Tree>().iterator(),
    Iterators.singletonIterator(closeBracket));
}
 
开发者ID:racodond,项目名称:sonar-css-plugin,代码行数:8,代码来源:BracketBlockTreeImpl.java

示例7: readdir

import com.google.common.collect.Iterators; //导入方法依赖的package包/类
public int readdir(Path path, Pointer buf, FuseFillDir filler, long offset, FuseFileInfo fi) throws IOException {
		// fill in names and basic file attributes - however only the filetype is used...
//		Files.walkFileTree(node, EnumSet.noneOf(FileVisitOption.class), 1, new SimpleFileVisitor<Path>() {
//
//			@Override
//			public FileVisitResult visitFile(Path file, BasicFileAttributes attrs) throws IOException {
//				FileStat stat = attrUtil.basicFileAttributesToFileStat(attrs);
//				if (attrs.isDirectory()) {
//					stat.st_mode.set(FileStat.S_IFDIR | FileStat.ALL_READ | FileStat.S_IXUGO);
//				} else {
//					stat.st_mode.set(FileStat.S_IFREG | FileStat.ALL_READ);
//				}
//				filter.apply(buf, file.getFileName().toString(), stat, 0);
//				return FileVisitResult.CONTINUE;
//			}
//		});

		// just fill in names, getattr gets called for each entry anyway
		try (DirectoryStream<Path> ds = Files.newDirectoryStream(path)) {
			Iterator<Path> sameAndParent = Iterators.forArray(SAME_DIR, PARENT_DIR);
			Iterator<Path> iter = Iterators.concat(sameAndParent, ds.iterator());
			while (iter.hasNext()) {
				String fileName = iter.next().getFileName().toString();
				if (filler.apply(buf, fileName, null, 0) != 0) {
					return -ErrorCodes.ENOMEM();
				}
			}
			return 0;
		} catch (DirectoryIteratorException e) {
			throw new IOException(e);
		}
	}
 
开发者ID:cryptomator,项目名称:fuse-nio-adapter,代码行数:33,代码来源:ReadOnlyDirectoryHandler.java

示例8: childrenIterator

import com.google.common.collect.Iterators; //导入方法依赖的package包/类
@Override
public Iterator<Tree> childrenIterator() {
  return Iterators.concat(
    Iterators.singletonIterator(ife),
    elseIf.iterator(),
    Iterators.singletonIterator(elsee));
}
 
开发者ID:racodond,项目名称:sonar-css-plugin,代码行数:8,代码来源:ScssIfElseIfElseTreeImpl.java

示例9: childrenIterator

import com.google.common.collect.Iterators; //导入方法依赖的package包/类
@Override
public Iterator<Tree> childrenIterator() {
  return Iterators.concat(
    Iterators.forArray(lessParentCombinator, scssParentCombinator),
    compoundSelectorsCombinationList.elementsAndSeparators(Function.identity(), Function.identity()),
    Iterators.forArray(scssBlockCombinator, lessExtend, lessMixinParameters, lessMixinGuard));
}
 
开发者ID:racodond,项目名称:sonar-css-plugin,代码行数:8,代码来源:SelectorTreeImpl.java

示例10: childrenIterator

import com.google.common.collect.Iterators; //导入方法依赖的package包/类
@Override
public Iterator<Tree> childrenIterator() {
  return Iterators.concat(
    Iterators.singletonIterator(openParenthesis),
    parameters != null ? parameters.elementsAndSeparators(Function.identity(), Function.identity()) : new ArrayList<Tree>().iterator(),
    Iterators.singletonIterator(closeParenthesis));
}
 
开发者ID:racodond,项目名称:sonar-css-plugin,代码行数:8,代码来源:ScssParametersTreeImpl.java

示例11: iterator

import com.google.common.collect.Iterators; //导入方法依赖的package包/类
public Iterator<ColumnDefinition> iterator()
{
    return Iterators.concat(statics.iterator(), regulars.iterator());
}
 
开发者ID:Netflix,项目名称:sstable-adaptor,代码行数:5,代码来源:PartitionColumns.java

示例12: selectOrderIterator

import com.google.common.collect.Iterators; //导入方法依赖的package包/类
public Iterator<ColumnDefinition> selectOrderIterator()
{
    return Iterators.concat(statics.selectOrderIterator(), regulars.selectOrderIterator());
}
 
开发者ID:Netflix,项目名称:sstable-adaptor,代码行数:5,代码来源:PartitionColumns.java

示例13: iterator

import com.google.common.collect.Iterators; //导入方法依赖的package包/类
@Override
public Iterator<NMSFurnaceRecipe> iterator() {
    return Iterators.concat(customRecipes.values().iterator(), vanillaRecipes.values().iterator());
}
 
开发者ID:Jannyboy11,项目名称:CustomRecipes,代码行数:5,代码来源:NMSFurnaceManager.java

示例14: iterator

import com.google.common.collect.Iterators; //导入方法依赖的package包/类
@Override
public Iterator<Recipe> iterator() {
    return Iterators.concat(shapedRecipes.iterator(), shapelessRecipes.iterator(), dynamicRecipes.iterator());
}
 
开发者ID:CloudLandGame,项目名称:CloudLand-Server,代码行数:5,代码来源:CraftingManager.java

示例15: nodesWithin

import com.google.common.collect.Iterators; //导入方法依赖的package包/类
@Override
public Iterator<Node> nodesWithin(BoundingBox bbox) {
    return Iterators.concat(file1.nodesWithin(bbox), file2.nodesWithin(bbox));
}
 
开发者ID:Mappy,项目名称:fpm,代码行数:5,代码来源:MultiSplittedFile.java


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