@Test public void testCompleted() throws Exception { final Registry<String> reg = RegistryBuilder.<String>create().register("Stuff", "Stuff").build(); Assert.assertEquals("Stuff", reg.lookup("Stuff")); Assert.assertEquals("Stuff", reg.lookup("stuff")); Assert.assertEquals(null, reg.lookup("miss")); Assert.assertEquals(null, reg.lookup(null)); }
@Override public I lookup(final String key) { if (key == null) { return null; } return map.get(key.toLowerCase(Locale.ROOT)); }
Registry implements Lookup<I> { @Override public I lookup(final String key) { if (key == null) { return null; } return map.get(key.toLowerCase(Locale.ROOT)); } }
Registry implements Lookup<I> { @Override public I lookup(final String key) { if (key == null) { return null; } return map.get(key.toLowerCase(Locale.ROOT)); } Registry(final Map<String, I> map); }
Registry implements Lookup<I> { @Override public I lookup(final String key) { if (key == null) { return null; } return map.get(key.toLowerCase(Locale.ROOT)); } Registry(final Map<String, I> map); @Override I lookup(final String key); @Override String toString(); }
Registry implements Lookup<I> { @Override public I lookup(final String key) { if (key == null) { return null; } return map.get(key.toLowerCase(Locale.ROOT)); } Registry(final Map<String, I> map); @Override I lookup(final String key); @Override String toString();  }