Example usage for java.lang Runnable hashCode

List of usage examples for java.lang Runnable hashCode

Introduction

In this page you can find the example usage for java.lang Runnable hashCode.

Prototype

@HotSpotIntrinsicCandidate
public native int hashCode();

Source Link

Document

Returns a hash code value for the object.

Usage

From source file:Main.java

public static ThreadFactory setThreadNameWithID(String name) {
    return (Runnable r) -> new Thread(r, String.format("%s-%s", name, r.hashCode()));
}