question: private boolean matchDomain ( String testDomain , String tailDomain ) { if ( ! testDomain . endsWith ( tailDomain ) ) { return false ; } if ( testDomain . length ( ) == tailDomain . length ( ) ) { return true ; } if ( tailDomain . charAt ( 0 ) == '.' ) { return true ; } return testDomain . charAt ( testDomain . length ( ) - tailDomain . length ( ) - 1 ) == '.' ; }
target:  Returns true if the full domain's final segments match the tail domain.