public ImmutableNamespaces withPrefix ( String prefix , String namespaceURI ) { Objects . requireNonNull ( prefix , "Prefix cannot be null" ) ; Objects . requireNonNull ( namespaceURI , "Namespace URI cannot be null" ) ; ImmutableNamespaces result = new ImmutableNamespaces ( this . map ) ; result . map . put ( prefix , namespaceURI ) ; return result ; }
Create a copy of the namespaces which includes a mapping between a given prefix and namespace URI .