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


Java Function类代码示例

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


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

示例1: GenericTreeReader

import org.aikodi.rejuse.function.Function; //导入依赖的package包/类
private GenericTreeReader(String tagName,
						 Producer<TYPE, E> defaultConstructor,
						 Function<TreeNode, ? extends TYPE, ? extends E> constructorWithAttributes,
						 BiFunction<PARENTTYPE, TreeNode, ? extends TYPE, ? extends E> constructorWithParent,
						 BiConsumer<TYPE, String, E> textProcessor,
						 BiConsumer<PARENTTYPE, TYPE, E> closerWithParent,
						 boolean descend,
						 List<InternalTreeReader<?, ? super TYPE, ? extends E>> childReaders,
						 List<InternalTreeReader<?, ? super TYPE, ? extends E>> descendantReaders
) {
	super();
	this.childReaders = new HashMap<>();
	childReaders.forEach(reader -> this.childReaders.put(reader.tagName(), reader));
	this.descendantReaders = new HashMap<>();
	descendantReaders.forEach(reader -> this.descendantReaders.put(reader.tagName(), reader));
	this.descend = descend;
	this.tagName = tagName;
	this.defaultConstructor = defaultConstructor;
	this.constructorWithParent = constructorWithParent;
	this.constructorWithAttributes = constructorWithAttributes;
	this.textProcessor = textProcessor;
	this._closerWithParent = closerWithParent;
}
 
开发者ID:markovandooren,项目名称:rejuse,代码行数:24,代码来源:TreeReader.java

示例2: declarationTypeSelector

import org.aikodi.rejuse.function.Function; //导入依赖的package包/类
private PredicateSelector<Element> declarationTypeSelector() {
  ListContentProvider<Class> contentProvider = new ListContentProvider<Class>() {

    @Override
    public List<Class> items(Object context) {
      return ImmutableList.<Class>of(Declaration.class,Namespace.class,Type.class,Method.class,Variable.class);
    }
  };
  LabelProvider labelProvider = new LabelProvider(){

    @Override
    public String text(Object object) {
      String result = null; 
      if(object instanceof Class) {
        if(object == Declaration.class) {
          result = "All declarations";
        } else {
          result = ((Class) object).getSimpleName();
        }
      }
      return result;
    }
  };
  Function<Class,UniversalPredicate<? super Element, Nothing>,Nothing> function = new Function<Class, UniversalPredicate<? super Element,Nothing>, Nothing>() {

    @Override
    public UniversalPredicate<? super Element, Nothing> apply(Class argument) throws Nothing {
      return new TypePredicate(argument);
    }
  };
  ComboBoxSelector<Class,Element> selector = new ComboBoxSelector<>(contentProvider, labelProvider,function,2);
  return selector;
}
 
开发者ID:markovandooren,项目名称:jnome,代码行数:34,代码来源:JavaDependencyOptions.java

示例3: open

import org.aikodi.rejuse.function.Function; //导入依赖的package包/类
public RootNodeFirstConfigurator<TYPE, E, Builder<TYPE,E>> open(String tagName, Function<TreeNode, TYPE, E> producer) {
	return new RootNodeFirstConfigurator<TYPE, E, Builder<TYPE,E>>(this, tagName, producer);
}
 
开发者ID:markovandooren,项目名称:rejuse,代码行数:4,代码来源:TreeReader.java

示例4: RootNodeFirstConfigurator

import org.aikodi.rejuse.function.Function; //导入依赖的package包/类
protected RootNodeFirstConfigurator(P parent, String tagName, Function<TreeNode, TYPE, E> constructorWithNode) {
	super(parent, tagName);
	requireNotNull(constructorWithNode);
	this.constructorWithNode = constructorWithNode;
}
 
开发者ID:markovandooren,项目名称:rejuse,代码行数:6,代码来源:TreeReader.java

示例5: constructorWithNode

import org.aikodi.rejuse.function.Function; //导入依赖的package包/类
public Function<TreeNode, TYPE, E> constructorWithNode() {
	return constructorWithNode;
}
 
开发者ID:markovandooren,项目名称:rejuse,代码行数:4,代码来源:TreeReader.java

示例6: NodeFirstAddOnCloseConfigurator

import org.aikodi.rejuse.function.Function; //导入依赖的package包/类
private NodeFirstAddOnCloseConfigurator(P parent, String tagName, Function<TreeNode, TYPE, E> constructorWithNode) {
	super(parent, tagName);
	requireNotNull(constructorWithNode);
	
	this.constructorWithNode = constructorWithNode;
}
 
开发者ID:markovandooren,项目名称:rejuse,代码行数:7,代码来源:TreeReader.java

示例7: createMapper

import org.aikodi.rejuse.function.Function; //导入依赖的package包/类
@Override
protected Function<Declaration, List<Declaration>,Nothing> createMapper() {
  return new JavaDeclarationDecomposer();
}
 
开发者ID:markovandooren,项目名称:jnome,代码行数:5,代码来源:JavaDependencyAnalyzer.java

示例8: mapper

import org.aikodi.rejuse.function.Function; //导入依赖的package包/类
private Function<Declaration,List<Declaration>,Nothing> mapper() {
  return new JavaDeclarationDecomposer();
}
 
开发者ID:markovandooren,项目名称:jnome,代码行数:4,代码来源:JavaDependencyOptions.java


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