Java 类org.apache.commons.collections15.functors.TruePredicate 实例源码

项目:Excitement-TDMLEDA    文件:DependencyPathsFromTreeSnow.java   
/**
 * @param theNodeConstructor constructs new tree nodes.
 */ 
@SuppressWarnings("unchecked")
public DependencyPathsFromTreeSnow(AbstractNodeConstructor<T, S> theNodeConstructor) {
    super(theNodeConstructor);
    oneBranchDPFT = new DependencyPathsFromTree<T,S>(theNodeConstructor, 
                    /* start (root)  */   new NounPredicate<T>(), 
                    /* end (leaf)    */   new NounPredicate<T>(), 
                    /* stop */  new VerbRelativeClausePredicate<T>(), // TODO: limit by length (4)
                    /* createDependencyPathsWithTwoBranches */ false,
                    /* theFilterPathsWithOnlyStopwords */true);
    twoBranchDPFT = new DependencyPathsFromTree<T,S>(theNodeConstructor, 
            /* start (root)  */   TruePredicate.INSTANCE, 
            /* end (leaf)    */   new NounPredicate<T>(), 
            /* stop */  new VerbRelativeClausePredicate<T>(),  // TODO: limit by length (4)
            /* createDependencyPathsWithTwoBranches */ true,
            /* theFilterPathsWithOnlyStopwords */true);
}
项目:BfROpenLab    文件:ShapePickSupport.java   
/**
   * Quick test to allow optimization of <code>getFilteredVertices()</code>.
   * @return <code>true</code> if there is an active vertex filtering
   * mechanism for this visualization, <code>false</code> otherwise
   */
  protected boolean verticesAreFiltered() {
Predicate<Context<Graph<V,E>,V>> vertexIncludePredicate =
    vv.getRenderContext().getVertexIncludePredicate();
return vertexIncludePredicate != null &&
    vertexIncludePredicate instanceof TruePredicate == false;
  }
项目:BfROpenLab    文件:ShapePickSupport.java   
/**
   * Quick test to allow optimization of <code>getFilteredEdges()</code>.
   * @return <code>true</code> if there is an active edge filtering
   * mechanism for this visualization, <code>false</code> otherwise
   */
  protected boolean edgesAreFiltered() {
Predicate<Context<Graph<V,E>,E>> edgeIncludePredicate =
    vv.getRenderContext().getEdgeIncludePredicate();
return edgeIncludePredicate != null &&
    edgeIncludePredicate instanceof TruePredicate == false;
  }