public boolean isDescendant ( URL url ) { if ( url . protocol != null && protocol != null && ! protocol . equals ( url . protocol ) ) { return false ; } if ( adapterAddress != null && url . adapterAddress == null ) { return true ; } if ( adapterAddress != null && ! adapterAddress . equals ( url . adapterAddress ) ) { return false ; } if ( deviceAddress != null && url . deviceAddress == null ) { return true ; } if ( deviceAddress != null && ! deviceAddress . equals ( url . deviceAddress ) ) { return false ; } if ( serviceUUID != null && url . serviceUUID == null ) { return true ; } if ( serviceUUID != null ? ! serviceUUID . equals ( url . serviceUUID ) : url . serviceUUID != null ) { return false ; } if ( characteristicUUID != null && url . characteristicUUID == null ) { return true ; } if ( characteristicUUID != null ? ! characteristicUUID . equals ( url . characteristicUUID ) : url . characteristicUUID != null ) { return false ; } return fieldName != null && url . fieldName == null ; }
Checks whether the URL is a descendant of a URL provided as an argument . If the provided URL does not specify protocol then it will match any protocol of the URL