@Override
 public int hashCode() {
   return (pathPrefix.getPriority() << 1) + (resource.wasRerooted() ? 1 : 0);
 }
 public RerootedResource(AbstractResource resource, PathPrefix pathPrefix) {
   this.path = pathPrefix.getRerootedPath(resource.getPath());
   this.resource = resource;
 }
 public ResourceData(AbstractResource resource, PathPrefix pathPrefix) {
   this.resource =
       pathPrefix.shouldReroot() ? new RerootedResource(resource, pathPrefix) : resource;
   this.pathPrefix = pathPrefix;
 }