class BluetoothCentral {

    public @NotNull BluetoothPeripheral getPeripheral(@NotNull String peripheralAddress) {
        Objects.requireNonNull(peripheralAddress, "no valid peripheral address provided");

        if (!BluetoothAdapter.checkBluetoothAddress(peripheralAddress)) {
            final String message = String.format("%s is not a valid bluetooth address. Make sure all alphabetic characters are uppercase.", peripheralAddress);
            throw new IllegalArgumentException(message);
        }

        if (connectedPeripherals.containsKey(peripheralAddress)) {
            return Objects.requireNonNull(connectedPeripherals.get(peripheralAddress));
        } else if (unconnectedPeripherals.containsKey(peripheralAddress)) {
            return Objects.requireNonNull(unconnectedPeripherals.get(peripheralAddress));
        } else if (scannedPeripherals.containsKey(peripheralAddress)) {
            return Objects.requireNonNull(scannedPeripherals.get(peripheralAddress));
        } else {
            BluetoothPeripheral peripheral = new BluetoothPeripheral(context, bluetoothAdapter.getRemoteDevice(peripheralAddress), internalCallback, null, callBackHandler);
            scannedPeripherals.put(peripheralAddress, peripheral);
            return peripheral;
        }
    }

    public  BluetoothCentral(@NotNull Context context, @NotNull BluetoothCentralCallback bluetoothCentralCallback, @NotNull Handler handler);

}