@Test public void testGetPrefix() throws Exception { testGetPrefix(new XmlNamespaceContext(Collections.map( tuple("foo", "http: tuple("bar", "http: testGetPrefix(XmlNamespaceContext.mk(asList( new XmlNamespaceBinding("foo", "http: new XmlNamespaceBinding("bar", "http: }
@Override public String getPrefix(String uri) { return $(prefixToUri.entrySet()).find(Booleans.eq(RequireUtil.notNull(uri, "uri")).o(value)).map(key).orNull(); }
XmlNamespaceContext implements NamespaceContext { @Override public String getPrefix(String uri) { return $(prefixToUri.entrySet()).find(Booleans.eq(RequireUtil.notNull(uri, "uri")).o(value)).map(key).orNull(); } }
XmlNamespaceContext implements NamespaceContext { @Override public String getPrefix(String uri) { return $(prefixToUri.entrySet()).find(Booleans.eq(RequireUtil.notNull(uri, "uri")).o(value)).map(key).orNull(); } XmlNamespaceContext(Map<String, String> prefixToUri); }
XmlNamespaceContext implements NamespaceContext { @Override public String getPrefix(String uri) { return $(prefixToUri.entrySet()).find(Booleans.eq(RequireUtil.notNull(uri, "uri")).o(value)).map(key).orNull(); } XmlNamespaceContext(Map<String, String> prefixToUri); static XmlNamespaceContext mk(Map<String, String> prefixToUri); static XmlNamespaceContext mk(XmlNamespaceBinding... bindings); static XmlNamespaceContext mk(String prefix, String namespaceUri); static XmlNamespaceContext mk(List<XmlNamespaceBinding> bindings); static XmlNamespaceContext mk(Stream<XmlNamespaceBinding> bindings); @Override String getNamespaceURI(String prefix); @Override String getPrefix(String uri); @Override Iterator getPrefixes(String uri); List<XmlNamespaceBinding> getBindings(); XmlNamespaceContext add(XmlNamespaceBinding... bindings); XmlNamespaceContext add(XmlNamespaceContext bindings); NamespaceContext merge(final NamespaceContext precedence); static NamespaceContext merge(final NamespaceContext a, final NamespaceContext b); }
XmlNamespaceContext implements NamespaceContext { @Override public String getPrefix(String uri) { return $(prefixToUri.entrySet()).find(Booleans.eq(RequireUtil.notNull(uri, "uri")).o(value)).map(key).orNull(); } XmlNamespaceContext(Map<String, String> prefixToUri); static XmlNamespaceContext mk(Map<String, String> prefixToUri); static XmlNamespaceContext mk(XmlNamespaceBinding... bindings); static XmlNamespaceContext mk(String prefix, String namespaceUri); static XmlNamespaceContext mk(List<XmlNamespaceBinding> bindings); static XmlNamespaceContext mk(Stream<XmlNamespaceBinding> bindings); @Override String getNamespaceURI(String prefix); @Override String getPrefix(String uri); @Override Iterator getPrefixes(String uri); List<XmlNamespaceBinding> getBindings(); XmlNamespaceContext add(XmlNamespaceBinding... bindings); XmlNamespaceContext add(XmlNamespaceContext bindings); NamespaceContext merge(final NamespaceContext precedence); static NamespaceContext merge(final NamespaceContext a, final NamespaceContext b);  }