Java tutorial
//package com.java2s; //License from project: Apache License import android.support.annotation.NonNull; import java.util.UUID; public class Main { /** * UUID to short style value * * @param uuid the UUID * @return short style value, -1 if the specified UUID is not short style */ public static int toShortValue(@NonNull UUID uuid) { return (int) ((uuid.getMostSignificantBits() >> 32) & 0xffff); } }