public synchronized IntegerList getDomainIds(final IdentifierList inputDomain) { final IntegerList ids = new IntegerList(); if (inputDomain == null) { return ids; } if (HelperCOM.domainContainsWildcard(inputDomain)) { for (Map.Entry<IdentifierList, Integer> entry : this.fastID.entrySet()) { try { if (HelperCOM.domainMatchesWildcardDomain(entry.getKey(), inputDomain)) { // Does the domain matches the wildcard? ids.add(entry.getValue()); } } catch (Exception ex) { Logger.getLogger(FastDomain.class.getName()).log(Level.SEVERE, null, ex); } } } else { final Integer id = this.fastID.get(inputDomain); if (id == null) { ids.add(this.addNewDomain(inputDomain)); } else { ids.add(id); } } return ids; }