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

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

Introduction

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

Prototype

@HotSpotIntrinsicCandidate
public native int hashCode();

Source Link

Document

Returns a hash code value for the object.

Usage

From source file:com.lyndir.lhunath.opal.system.util.NNFunctionNN.java

static <F, T> NNFunctionNN<F, T> of(final Function<F, T> func) {

    return new NNFunctionNN<F, T>() {
        @Nonnull/*ww w  . j ava  2 s.c o m*/
        @Override
        public T apply(@Nonnull final F input) {

            return Verify.verifyNotNull(func.apply(input));
        }

        @Override
        @SuppressWarnings("EqualsWhichDoesntCheckParameterClass")
        public boolean equals(@Nonnull final Object object) {

            return func.equals(object);
        }

        @Override
        public int hashCode() {

            return func.hashCode();
        }
    };
}