本文整理汇总了Java中org.apache.commons.collections15.functors.TruePredicate类的典型用法代码示例。如果您正苦于以下问题:Java TruePredicate类的具体用法?Java TruePredicate怎么用?Java TruePredicate使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
TruePredicate类属于org.apache.commons.collections15.functors包,在下文中一共展示了TruePredicate类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: DependencyPathsFromTreeSnow
import org.apache.commons.collections15.functors.TruePredicate; //导入依赖的package包/类
/**
* @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);
}
示例2: verticesAreFiltered
import org.apache.commons.collections15.functors.TruePredicate; //导入依赖的package包/类
/**
* 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;
}
示例3: edgesAreFiltered
import org.apache.commons.collections15.functors.TruePredicate; //导入依赖的package包/类
/**
* 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;
}