you can just write "return s.getHost() == this.rootURL.getHost() "