Example usage for com.google.common.base Predicate hashCode

List of usage examples for com.google.common.base Predicate hashCode

Introduction

In this page you can find the example usage for com.google.common.base Predicate hashCode.

Prototype

@HotSpotIntrinsicCandidate
public native int hashCode();

Source Link

Document

Returns a hash code value for the object.

Usage

From source file:zotmc.collect.FluentPredicate.java

public static <T> FluentPredicate<T> from(final Predicate<T> predicate) {
    if (predicate instanceof FluentPredicate)
        return (FluentPredicate<T>) predicate;

    return new FluentPredicate<T>() {
        @Override/*from   w  ww . j  a  v  a 2 s. co m*/
        public boolean apply(T input) {
            return predicate.apply(input);
        }

        @Override
        protected Predicate<T> unwrap() {
            return predicate;
        }

        @Override
        public int hashCode() {
            return predicate.hashCode();
        }

        @Override
        public String toString() {
            return predicate.toString();
        }
    };
}