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

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

Introduction

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

Prototype

public static <T> Predicate<T> equalTo(@Nullable T target) 

Source Link

Document

Returns a predicate that evaluates to true if the object being tested equals() the given target or both are null.

Usage

From source file:org.apache.brooklyn.util.guava.IfFunctions.java

public static <I> IfFunctionBuilderApplyingFirst<I> ifEquals(I test) {
    return ifPredicate(Predicates.equalTo(test));
}

From source file:com.replaymod.replaystudio.pathing.change.RemoveKeyframe.java

@NonNull
public static RemoveKeyframe create(@NonNull Path path, @NonNull Keyframe keyframe) {
    return new RemoveKeyframe(path.getTimeline().getPaths().indexOf(path),
            Iterables.indexOf(path.getKeyframes(), Predicates.equalTo(keyframe)));
}

From source file:com.complexible.common.openrdf.model.Statements.java

public static Predicate<Statement> predicateIs(final URI thePred) {
    return Predicates.compose(Predicates.equalTo(thePred), predicate());
}

From source file:jetbrains.jetpad.hybrid.parser.BaseToken.java

@Override
public Predicate<String> getValidator() {
    return Predicates.equalTo(text());
}

From source file:org.jclouds.util.Multimaps2.java

public static <K, V> Multimap<K, V> withoutKey(Multimap<K, V> fromMultimap, K key) {
    return Multimaps.<K, V>filterKeys(fromMultimap, Predicates.not(Predicates.equalTo(key)));
}

From source file:org.apache.brooklyn.util.guava.IfFunctions.java

public static <I> IfFunctionBuilderApplyingFirst<I> ifNotEquals(I test) {
    return ifPredicate(Predicates.not(Predicates.equalTo(test)));
}

From source file:pkmntv.logic.TypeEffect.java

public static Map getImmuneEffectMap() {
    return Maps.filterValues(TYPE_MAP, Predicates.equalTo(IMMUNE_FACTOR));
}

From source file:com.complexible.common.openrdf.model.Statements.java

public static Predicate<Statement> objectIs(final Value theObj) {
    return Predicates.compose(Predicates.equalTo(theObj), object());
}

From source file:org.apache.brooklyn.core.sensor.SensorEventPredicates.java

public static <T> Predicate<SensorEvent<T>> valueEqualTo(final T val) {
    return valueSatisfies(Predicates.equalTo(val));
}

From source file:com.complexible.common.openrdf.model.Statements.java

public static Predicate<Statement> contextIs(final Resource theContext) {
    return Predicates.compose(Predicates.equalTo(theContext), context());
}