Example usage for com.google.common.base Predicates alwaysTrue

List of usage examples for com.google.common.base Predicates alwaysTrue

Introduction

In this page you can find the example usage for com.google.common.base Predicates alwaysTrue.

Prototype

@GwtCompatible(serializable = true)
public static <T> Predicate<T> alwaysTrue() 

Source Link

Document

Returns a predicate that always evaluates to true .

Usage

From source file:org.spongepowered.common.world.gen.populators.RandomBlockPopulator.java

public RandomBlockPopulator(BlockState block, VariableAmount count, VariableAmount height) {
    this.count = checkNotNull(count);
    this.state = checkNotNull(block);
    this.height = checkNotNull(height);
    this.check = Predicates.alwaysTrue();
}

From source file:brooklyn.entity.webapp.nodejs.NodeJsWebAppServiceImpl.java

@Override
protected void connectSensors() {
    super.connectSensors();

    ConfigToAttributes.apply(this);

    HostAndPort accessible = BrooklynAccessUtils.getBrooklynAccessibleAddress(this, getHttpPort());
    String nodeJsUrl = String.format("http://%s:%d", accessible.getHostText(), accessible.getPort());
    LOG.info("Connecting to {}", nodeJsUrl);

    httpFeed = HttpFeed.builder().entity(this).baseUri(nodeJsUrl)
            .poll(new HttpPollConfig<Boolean>(SERVICE_UP).suburl(getConfig(NodeJsWebAppService.SERVICE_UP_PATH))
                    .checkSuccess(Predicates.alwaysTrue()).onSuccess(HttpValueFunctions.responseCodeEquals(200))
                    .setOnException(false))
            .build();/*from   w ww  .ja  va2s.  c om*/

    WebAppServiceMethods.connectWebAppServerPolicies(this);
}

From source file:com.eucalyptus.simpleworkflow.persist.PersistenceActivityTypes.java

public <T> List<T> listDeprecatedExpired(final long time, final Function<? super ActivityType, T> transform)
        throws SwfMetadataException {
    return listByExample(ActivityType.exampleWithOwner(null), Predicates.alwaysTrue(),
            Restrictions.lt("deprecationTimestamp",
                    new Date(time - getDeprecatedActivityTypeRetentionDurationMillis())),
            Collections.<String, String>emptyMap(), transform);
}

From source file:com.eucalyptus.simpleworkflow.persist.PersistenceWorkflowTypes.java

public <T> List<T> listDeprecatedExpired(final long time, final Function<? super WorkflowType, T> transform)
        throws SwfMetadataException {
    return listByExample(WorkflowType.exampleWithOwner(null), Predicates.alwaysTrue(),
            Restrictions.conjunction().add(Restrictions.isEmpty("executions"))
                    .add(Restrictions.lt("deprecationTimestamp",
                            new Date(time - getDeprecatedWorkflowTypeRetentionDurationMillis()))),
            Collections.<String, String>emptyMap(), transform);
}

From source file:org.jnario.runner.FeatureRunner.java

@Override
protected Predicate<FrameworkMethod> isTestMethod() {
    return Predicates.alwaysTrue();
}

From source file:org.jclouds.trmk.vcloud_0_8.config.DefaultVCloudReferencesModule.java

@Provides
@Singleton
@org.jclouds.trmk.vcloud_0_8.endpoints.TasksList
protected Predicate<ReferenceType> provideDefaultTasksListSelector(Injector i) {
    return Predicates.alwaysTrue();
}

From source file:de.cosmocode.palava.ipc.cache.AbstractIpcCacheService.java

@Override
public void invalidate(Class<? extends IpcCommand> command) {
    Preconditions.checkNotNull(command, "Command");
    invalidate(command, Predicates.alwaysTrue());
}

From source file:net.automatalib.util.automata.copy.AutomatonLowLevelCopy.java

/**
 * Copies an {@link Automaton} to a {@link MutableAutomaton} with possibly heterogeneous input alphabets and
 * state and transition properties./*from w ww.  j  a v a2  s.co m*/
 * 
 * @param <S1> input automaton state type
 * @param <I1> input automaton input symbol type
 * @param <T1> input automaton transition type
 * @param <S2> output automaton state type
 * @param <I2> output automaton input symbol type
 * @param <T2> output automaton transition type
 * @param <SP2> output automaton state property type
 * @param <TP2> output automaton transition property type
 * @param method the copy method to use
 * @param in the input automaton
 * @param inputs the inputs to consider
 * @param out the output automaton
 * @param inputsMapping the transformation for input symbols
 * @param spMapping the function for obtaining state properties
 * @param tpMapping the function for obtaining transition properties
 * @param stateFilter the filter predicate for states
 * @param transFilter the filter predicate for transitions
 * @return a mapping from old to new states
 */
public static <S1, I1, T1, S2, I2, T2, SP2, TP2> Mapping<S1, S2> rawCopy(AutomatonCopyMethod method,
        Automaton<S1, ? super I1, T1> in, Collection<? extends I1> inputs,
        MutableAutomaton<S2, I2, T2, ? super SP2, ? super TP2> out,
        Function<? super I1, ? extends I2> inputsMapping, Function<? super S1, ? extends SP2> spMapping,
        Function<? super T1, ? extends TP2> tpMapping, Predicate<? super S1> stateFilter,
        TransitionPredicate<? super S1, ? super I1, ? super T1> transFilter) {
    if (spMapping == null) {
        spMapping = Functions.constant(null);
    }
    if (tpMapping == null) {
        tpMapping = Functions.constant(null);
    }
    if (stateFilter == null) {
        stateFilter = Predicates.alwaysTrue();
    }
    if (transFilter == null) {
        transFilter = TransitionPredicates.alwaysTrue();
    }

    LowLevelAutomatonCopier<S1, I1, T1, S2, I2, T2, SP2, TP2> copier = method.createLowLevelCopier(in, inputs,
            out, inputsMapping, spMapping, tpMapping, stateFilter, transFilter);
    copier.doCopy();
    return copier.getStateMapping();
}

From source file:com.github.rinde.rinsim.core.model.comm.CommDevice.java

CommDevice(CommDeviceBuilder builder) {
    model = builder.model;/*from   w  w  w  .jav a 2  s.  com*/
    user = builder.user;
    reliability = builder.deviceReliability;
    maxRange = builder.deviceMaxRange;
    if (maxRange.isPresent()) {
        rangePredicate = new RangePredicate(user, maxRange.get());
    } else {
        rangePredicate = Predicates.alwaysTrue();
    }
    unreadMessages = new ArrayList<>();
    outbox = new ArrayList<>();
    receivedCount = 0;
    model.addDevice(this, user);
    registered = true;
}

From source file:net.shibboleth.idp.profile.interceptor.ProfileInterceptorFlowDescriptor.java

/** Constructor. */
public ProfileInterceptorFlowDescriptor() {
    activationCondition = Predicates.alwaysTrue();
    supportsNonBrowser = true;
}