Here you can find the source of hasHexOrDecLongUrnSuffix(String value)
public static boolean hasHexOrDecLongUrnSuffix(String value)
//package com.java2s; public class Main { public static boolean hasHexOrDecLongUrnSuffix(String value) { String[] arr = value.split(":"); String suffix = arr[arr.length - 1]; return assertHexOrDecLongValue(suffix); }/* www . ja v a2 s. co m*/ public static boolean assertHexOrDecLongValue(String value) { try { parseHexOrDecLong(value); } catch (NumberFormatException nfe) { return false; } return true; } public static Long parseHexOrDecLong(String value) { return value.startsWith("0x") ? Long.parseLong(value.substring(2), 16) : Long.parseLong(value, 10); } }