DeviceID { public DeviceID resolve(DeviceID baseID) throws InvalidDeviceIDException { String offset = this.toString(); return DeviceID.fromStringWithBaseID(offset, baseID); } private  DeviceID(long deviceIDAs32BitValue); static DeviceID fromString(String deviceID); static DeviceID fromStringWithBaseID(String offset, DeviceID baseID); static DeviceID fromByteArray(byte[] deviceIDBytes); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString(); byte[] asByteArray(); DeviceID resolve(DeviceID baseID); static final DeviceID ENOCEAN_BROADCAST_ID; static final int ENOCEAN_ESP_ID_LENGTH; }
@Test public void testResolve() throws Exception { DeviceID base = DeviceID.fromString("0xFF800000"); DeviceID relativeID = DeviceID.fromString("0x11"); DeviceID absoluteID = relativeID.resolve(base); assertDeviceIDBytes(absoluteID, 0x11, 0x00, 0x80, 0xFF); }