@Test public void testIsMacValid() { assertTrue(Neatle.isMacValid("00:11:22:33:44:55")); assertTrue(Neatle.isMacValid("00:11:22:33:44:55")); assertTrue(Neatle.isMacValid("aa:bb:cc:dd:ee:ff")); assertTrue(Neatle.isMacValid("00:22:bb:cd:ef:12")); assertFalse(Neatle.isMacValid("")); assertFalse(Neatle.isMacValid("loremipsup")); assertFalse(Neatle.isMacValid("00:22:bb:cd:ef:gg")); assertFalse(Neatle.isMacValid(":::::")); }
public static boolean isMacValid(@NonNull String mac) { return BluetoothAdapter.checkBluetoothAddress(mac.toUpperCase()); }
Neatle { public static boolean isMacValid(@NonNull String mac) { return BluetoothAdapter.checkBluetoothAddress(mac.toUpperCase()); } }
Neatle { public static boolean isMacValid(@NonNull String mac) { return BluetoothAdapter.checkBluetoothAddress(mac.toUpperCase()); } private  Neatle(); }
Neatle { public static boolean isMacValid(@NonNull String mac) { return BluetoothAdapter.checkBluetoothAddress(mac.toUpperCase()); } private  Neatle(); static CharacteristicSubscription createSubscription(@NonNull Context context, @NonNull BluetoothDevice device,
                                                                @NonNull UUID serviceUUID, @NonNull UUID characteristicsUUID); static ConnectionMonitor createConnectionMonitor(@NonNull Context context, @NonNull BluetoothDevice device); static OperationBuilder createOperationBuilder(@NonNull Context context); static UUID createUUID(int uuid); static Connection getConnection(@NonNull Context context, @NonNull BluetoothDevice device); static boolean isMacValid(@NonNull String mac); static BluetoothDevice getDevice(@NonNull String mac); static ScanBuilder createScannerBuilder(); }
Neatle { public static boolean isMacValid(@NonNull String mac) { return BluetoothAdapter.checkBluetoothAddress(mac.toUpperCase()); } private  Neatle(); static CharacteristicSubscription createSubscription(@NonNull Context context, @NonNull BluetoothDevice device,
                                                                @NonNull UUID serviceUUID, @NonNull UUID characteristicsUUID); static ConnectionMonitor createConnectionMonitor(@NonNull Context context, @NonNull BluetoothDevice device); static OperationBuilder createOperationBuilder(@NonNull Context context); static UUID createUUID(int uuid); static Connection getConnection(@NonNull Context context, @NonNull BluetoothDevice device); static boolean isMacValid(@NonNull String mac); static BluetoothDevice getDevice(@NonNull String mac); static ScanBuilder createScannerBuilder();  }