@Test(expected = NullPointerException.class) public void testRegisterInvalidInput() throws Exception { final LookupRegistry<Object> matcher = new UriRegexMatcher<>(); matcher.register(null, null); }
@Override public synchronized void register(final String regex, final T obj) { Args.notNull(regex, "URI request regex"); this.objectMap.put(regex, obj); this.patternMap.put(regex, Pattern.compile(regex)); }
UriRegexMatcher implements LookupRegistry<T> { @Override public synchronized void register(final String regex, final T obj) { Args.notNull(regex, "URI request regex"); this.objectMap.put(regex, obj); this.patternMap.put(regex, Pattern.compile(regex)); } }
UriRegexMatcher implements LookupRegistry<T> { @Override public synchronized void register(final String regex, final T obj) { Args.notNull(regex, "URI request regex"); this.objectMap.put(regex, obj); this.patternMap.put(regex, Pattern.compile(regex)); } UriRegexMatcher(); }
UriRegexMatcher implements LookupRegistry<T> { @Override public synchronized void register(final String regex, final T obj) { Args.notNull(regex, "URI request regex"); this.objectMap.put(regex, obj); this.patternMap.put(regex, Pattern.compile(regex)); } UriRegexMatcher(); @Override synchronized void register(final String regex, final T obj); @Override synchronized void unregister(final String regex); @Override synchronized T lookup(final String path); @Override String toString(); }
UriRegexMatcher implements LookupRegistry<T> { @Override public synchronized void register(final String regex, final T obj) { Args.notNull(regex, "URI request regex"); this.objectMap.put(regex, obj); this.patternMap.put(regex, Pattern.compile(regex)); } UriRegexMatcher(); @Override synchronized void register(final String regex, final T obj); @Override synchronized void unregister(final String regex); @Override synchronized T lookup(final String path); @Override String toString();  }