Example usage for android.graphics PorterDuff.Mode hashCode

List of usage examples for android.graphics PorterDuff.Mode hashCode

Introduction

In this page you can find the example usage for android.graphics PorterDuff.Mode hashCode.

Prototype

@HotSpotIntrinsicCandidate
public native int hashCode();

Source Link

Document

Returns a hash code value for the object.

Usage

From source file:Main.java

private static int generateCacheKey(int color, PorterDuff.Mode mode) {
    int hashCode = 1;
    hashCode = 31 * hashCode + color;/*from www .ja  va2 s. co m*/
    hashCode = 31 * hashCode + mode.hashCode();
    return hashCode;
}