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