Examples of BooleanFunctions


Examples of project.gluebooster.math.functions.BooleanFunctions

  {
     ComputedTreeNode<File> toTreeNodeFunction = new ComputedTreeNode<File>();
     toTreeNodeFunction.setAllowsChildrenFunction( ReflectionFunctions.createInvokeMethod("isDirectory"));
     //toTreeNodeFunction.setChildrenFunction( FunctionFactory.concatenation(ReflectionFunctions.createInvokeMethod("listFiles"), new ToIteratorFunction<File>(), new ForEachFunction<File, TreeNode>(toTreeNodeFunction), new IteratorToListFunction<TreeNode>(), new CollectionToArrayFunction<TreeNode>(TreeNode.class)));
     toTreeNodeFunction.setChildrenFunction( FunctionFactory.concatenation( ReflectionFunctions.createInvokeMethod("listFiles"), new ModifyingFunction( ModifyingFunction.Operation.iterate, toTreeNodeFunction)));
     toTreeNodeFunction.setIsLeafFunction(FunctionFactory.concatenation(ReflectionFunctions.createInvokeMethod("isDirectory")new BooleanFunctions(BooleanFunctions.Operation.not)));
     toTreeNodeFunction.setParentFunction(FunctionFactory.concatenation( ReflectionFunctions.createInvokeMethod("getParentFile"), toTreeNodeFunction));
     return toTreeNodeFunction.valueOf(file, context);
  }
View Full Code Here

Examples of project.gluebooster.math.functions.BooleanFunctions

   {
      BoostFunction<TreeNode, Boolean, InvocationContext> isNoLeafOrAllowed =  FunctionFactory.concatenation(
            new ModifyingFunction(ModifyingFunction.Operation.oneToArray,
                FunctionFactory.concatenation
                    ReflectionFunctions.createInvokeMethod("isLeaf"),
                    new BooleanFunctions(BooleanFunctions.Operation.not)),
                 leafAllowedFunction),
            new BooleanFunctions(BooleanFunctions.Operation.or));
      return createChildrenFilteringTreeNode(rootNode, isNoLeafOrAllowed, context);
           
     
   }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.