static PathPart makeAbsolute(PathPart oldPart){
  @SuppressWarnings("StringEquality") boolean encodedCached=oldPart.encoded != NOT_CACHED;
  String oldPath=encodedCached ? oldPart.encoded : oldPart.decoded;
  if (oldPath == null || oldPath.length() == 0 || oldPath.startsWith("/")) {
    return oldPart;
  }
  String newEncoded=encodedCached ? "/" + oldPart.encoded : NOT_CACHED;
  @SuppressWarnings("StringEquality") boolean decodedCached=oldPart.decoded != NOT_CACHED;
  String newDecoded=decodedCached ? "/" + oldPart.decoded : NOT_CACHED;
  return new PathPart(newEncoded,newDecoded);
}

static PathPart makeAbsolute ( PathPart oldPart ) { @ SuppressWarnings ( "StringEquality" ) boolean encodedCached = oldPart . encoded != NOT_CACHED ; String oldPath = encodedCached ? oldPart . encoded : oldPart . decoded ; if ( oldPath == null || oldPath . length ( ) == 0 || oldPath . startsWith ( "/" ) ) { return oldPart ; } String newEncoded = encodedCached ? "/" + oldPart . encoded : NOT_CACHED ; @ SuppressWarnings ( "StringEquality" ) boolean decodedCached = oldPart . decoded != NOT_CACHED ; String newDecoded = decodedCached ? "/" + oldPart . decoded : NOT_CACHED ; return new PathPart ( newEncoded , newDecoded ) ; }
prepends path values with " / " if they ' re present , not empty , and they don ' t already start with " / " .
