public static String formatAddress(final int address, final boolean add0x) {
        return add0x ?
                "0x" + String.format(Locale.US, "%04X", address) :
                String.format(Locale.US, "%04X", address);
    }
Abstract class for bluetooth mesh addresses
mesh/src/main/java/no/nordicsemi/android/mesh/utils/MeshAddress.java