nit: The code calling this could modify the arrayList after constructing a NamespaceIdentifier, which would be reflected in getName.

If immutability was that important, you could create a copy of the ArrayList and wrap that in Collections.unmodifiableList