@Test public void testWindows_toUri_normal() { URI fileUri = PathType.windows().toUri(fileSystemUri, "C:\\", ImmutableList.of("foo", "bar"), false); assertThat(fileUri.toString()).isEqualTo("jimfs: assertThat(fileUri.getPath()).isEqualTo("/C:/foo/bar"); URI directoryUri = PathType.windows().toUri(fileSystemUri, "C:\\", ImmutableList.of("foo", "bar"), true); assertThat(directoryUri.toString()).isEqualTo("jimfs: assertThat(directoryUri.getPath()).isEqualTo("/C:/foo/bar/"); URI rootUri = PathType.windows().toUri(fileSystemUri, "C:\\", ImmutableList.<String>of(), true); assertThat(rootUri.toString()).isEqualTo("jimfs: assertThat(rootUri.getPath()).isEqualTo("/C:/"); }
@Override public String toString(@NullableDecl String root, Iterable<String> names) { StringBuilder builder = new StringBuilder(); if (root != null) { builder.append(root); } joiner().appendTo(builder, names); return builder.toString(); }
WindowsPathType extends PathType { @Override public String toString(@NullableDecl String root, Iterable<String> names) { StringBuilder builder = new StringBuilder(); if (root != null) { builder.append(root); } joiner().appendTo(builder, names); return builder.toString(); } }
WindowsPathType extends PathType { @Override public String toString(@NullableDecl String root, Iterable<String> names) { StringBuilder builder = new StringBuilder(); if (root != null) { builder.append(root); } joiner().appendTo(builder, names); return builder.toString(); } private  WindowsPathType(); }
WindowsPathType extends PathType { @Override public String toString(@NullableDecl String root, Iterable<String> names) { StringBuilder builder = new StringBuilder(); if (root != null) { builder.append(root); } joiner().appendTo(builder, names); return builder.toString(); } private  WindowsPathType(); @Override ParseResult parsePath(String path); @Override String toString(@NullableDecl String root, Iterable<String> names); @Override String toUriPath(String root, Iterable<String> names, boolean directory); @Override ParseResult parseUriPath(String uriPath); }
WindowsPathType extends PathType { @Override public String toString(@NullableDecl String root, Iterable<String> names) { StringBuilder builder = new StringBuilder(); if (root != null) { builder.append(root); } joiner().appendTo(builder, names); return builder.toString(); } private  WindowsPathType(); @Override ParseResult parsePath(String path); @Override String toString(@NullableDecl String root, Iterable<String> names); @Override String toUriPath(String root, Iterable<String> names, boolean directory); @Override ParseResult parseUriPath(String uriPath);  }