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


Java Source类代码示例

本文整理汇总了Java中org.galagosearch.tupleflow.Source的典型用法代码示例。如果您正苦于以下问题:Java Source类的具体用法?Java Source怎么用?Java Source使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


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

示例1: instantiate

import org.galagosearch.tupleflow.Source; //导入依赖的package包/类
public org.galagosearch.tupleflow.Step instantiate(
        StageInstanceDescription instance,
        ArrayList<Step> steps)
        throws IncompatibleProcessorException, IOException {
    org.galagosearch.tupleflow.Step previous = null;
    org.galagosearch.tupleflow.Step first = null;

    for (Step step : steps) {
        org.galagosearch.tupleflow.Step current;

        if (step instanceof MultiStep) {
            current = instantiateMulti(instance, step);
        } else if (step instanceof InputStep) {
            current = instantiateInput(instance, (InputStep) step);
        } else if (step instanceof OutputStep) {
            current = instantiateOutput(instance, (OutputStep) step);
        } else {
            current = instantiateStep(instance, step);
        }

        if (first == null) {
            first = current;
        }
        if (previous != null) {
            ((Source) previous).setProcessor(current);
        }

        previous = current;
    }

    return first;
}
 
开发者ID:jjfiv,项目名称:galagosearch,代码行数:33,代码来源:StageInstanceFactory.java

示例2: add

import org.galagosearch.tupleflow.Source; //导入依赖的package包/类
public void add(Step stage) throws IncompatibleProcessorException {
    if (items.size() > 0) {
        // is this a ShreddedProcessor?
        Object previousSource = items.get(items.size() - 1);
        ((Source) previousSource).setProcessor(stage);
    }

    items.add(stage);
}
 
开发者ID:jjfiv,项目名称:galagosearch,代码行数:10,代码来源:Chain.java


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