public static final Unit<ArealDensity> KILOGRAM_PER_SQUARE_METER = addUnit(
new ProductUnit<ArealDensity>(SIUnits.KILOGRAM.divide(SIUnits.SQUARE_METRE)));
- public static final Unit<RadiationExposure> COULOMB_PER_KILOGRAM = addUnit(
- new ProductUnit<RadiationExposure>(Units.COULOMB.divide(SIUnits.KILOGRAM)));
-
public static final Unit<RadiationDoseAbsorptionRate> GRAY_PER_SECOND = addUnit(
new ProductUnit<RadiationDoseAbsorptionRate>(Units.GRAY.divide(Units.SECOND)));
if (channelID.charAt(30) != '-') {
return false;
}
- if (channelID.charAt(67) != '-') {
- return false;
- }
- return true;
+ return !(channelID.charAt(67) != '-');
}
public ChannelTypeUID registerChannelType(String characteristicUUID, boolean advanced, boolean readOnly,
throw new IllegalStateException("Unknown field format type: " + field.getUnit());
}
- if (itemType.equals("Switch")) {
+ if ("Switch".equals(itemType)) {
options = Collections.emptyList();
}
.hasPropertyEnabled(BluetoothCharacteristic.PROPERTY_BROADCAST))
.collect(Collectors.toUnmodifiableList());
- if (broadcastCharacteristics.size() == 0) {
+ if (broadcastCharacteristics.isEmpty()) {
logger.info(
"No Characteristic of service with UUID {} on {} has the broadcast property set, ignored.",
uuidStr, scanNotification.getAddress());
}
public void handleCommand(ChannelUID channelUID, Command command) {
-
// Handle REFRESH
if (command == RefreshType.REFRESH) {
if (canRead()) {
*/
package org.openhab.binding.bluetooth.generic.internal;
+import org.eclipse.jdt.annotation.NonNullByDefault;
import org.junit.jupiter.api.Test;
/**
* @author Connor Petty - Initial contribution
*
*/
+@NonNullByDefault
class BluetoothUnitTest {
@Test