List of usage examples for com.google.common.base Predicates alwaysTrue
@GwtCompatible(serializable = true) public static <T> Predicate<T> alwaysTrue()
From source file:com.sri.ai.grinder.sgdpllt.library.Associative.java
/** A static version of associate when check for associative operator is done, with predicate indicating whether argument of same functor is to be associated. */ public static Expression associateWhenSureOperatorIsAssociative(Expression expression) { Predicate<Expression> alwaysTrue = Predicates.alwaysTrue(); Expression result = associateWhenSureOperatorIsAssociative(expression, alwaysTrue); return result; }
From source file:cc.recommenders.mining.calls.DictionaryBuilder.java
public Dictionary<Feature> newDictionary(Collection<Usage> usages) { Predicate<Feature> alwaysTrue = Predicates.alwaysTrue(); return newDictionary(usages, alwaysTrue); }
From source file:org.locationtech.geogig.api.plumbing.ForEachRef.java
/** * @return the new value of the ref/* w ww.java2 s . co m*/ */ @Override protected ImmutableSet<Ref> _call() { @SuppressWarnings("unchecked") final Predicate<Ref> filter = (Predicate<Ref>) (this.filter == null ? Predicates.alwaysTrue() : this.filter); ImmutableSet.Builder<Ref> refs = new ImmutableSet.Builder<Ref>(); for (String refName : refDatabase().getAll().keySet()) { Optional<Ref> ref = command(RefParse.class).setName(refName).call(); if (ref.isPresent() && filter.apply(ref.get())) { Ref accepted = ref.get(); refs.add(accepted); } } return refs.build(); }
From source file:org.apache.druid.client.SingleServerInventoryProvider.java
@Override public ServerInventoryView get() { return new SingleServerInventoryView(zkPaths, curator, jsonMapper, Predicates.alwaysTrue()); }
From source file:org.apache.druid.client.BatchServerInventoryViewProvider.java
@Override public BatchServerInventoryView get() { return new BatchServerInventoryView(zkPaths, curator, jsonMapper, Predicates.alwaysTrue()); }
From source file:io.pcp.parfait.spring.timing.SpringEventTimerInjector.java
public SpringEventTimerInjector(EventTimer eventTimer) { this(eventTimer, Predicates.alwaysTrue()); }
From source file:net.sourceforge.cilib.moo.archive.constrained.ConstrainedArchive.java
public ConstrainedArchive() { this.predicate = Predicates.alwaysTrue(); this.capacity = 100000; }
From source file:cc.recommenders.evaluation.io.DecoratedObjectUsageStore.java
@Override public List<Usage> read(ICoReTypeName key) { Predicate<Usage> alwaysTrue = Predicates.alwaysTrue(); return read(key, alwaysTrue); }
From source file:com.facebook.buck.parser.BuildTargetPatternTargetNodeParser.java
@Override public TargetNodeSpec createForChildren(Path cellPath, Path basePath) { return TargetNodePredicateSpec.of(Predicates.alwaysTrue(), BuildFileSpec.fromPath(cellPath.resolve(basePath))); }
From source file:org.eclipse.buildship.core.util.progress.DelegatingProgressListener.java
/** * Creates a new {@link ProgressListener} that will forward all progress messages to the * provided {@link IProgressMonitor}.//ww w. java2 s . co m * * @param monitor the monitor to delegate to, may be null * @return the progress listener, never null */ public static ProgressListener withFullOutput(IProgressMonitor monitor) { return new DelegatingProgressListener(monitor, Predicates.alwaysTrue()); }