@Test public void testDictionaryDirectory() { Path path = new Path("/path", EnumSet.of(Path.Type.directory)); assertEquals(path, new PathDictionary().deserialize(path.serialize(SerializerFactory.get()))); }
@Override public <T> T serialize(final Serializer dict) { dict.setStringForKey(String.valueOf(type), "Type"); dict.setStringForKey(this.getAbsolute(), "Remote"); if(symlink != null) { dict.setObjectForKey(symlink, "Symbolic Link"); } dict.setObjectForKey(attributes, "Attributes"); return dict.getSerialized(); }
Path extends AbstractPath implements Referenceable, Serializable { @Override public <T> T serialize(final Serializer dict) { dict.setStringForKey(String.valueOf(type), "Type"); dict.setStringForKey(this.getAbsolute(), "Remote"); if(symlink != null) { dict.setObjectForKey(symlink, "Symbolic Link"); } dict.setObjectForKey(attributes, "Attributes"); return dict.getSerialized(); } }
Path extends AbstractPath implements Referenceable, Serializable { @Override public <T> T serialize(final Serializer dict) { dict.setStringForKey(String.valueOf(type), "Type"); dict.setStringForKey(this.getAbsolute(), "Remote"); if(symlink != null) { dict.setObjectForKey(symlink, "Symbolic Link"); } dict.setObjectForKey(attributes, "Attributes"); return dict.getSerialized(); } Path(final Path copy);  Path(final Path parent, final String name, final EnumSet<Type> type);  Path(final String absolute, final EnumSet<Type> type);  Path(final String absolute, final EnumSet<Type> type, final PathAttributes attributes);  Path(final Path parent, final String name, final EnumSet<Type> type, final PathAttributes attributes); }
Path extends AbstractPath implements Referenceable, Serializable { @Override public <T> T serialize(final Serializer dict) { dict.setStringForKey(String.valueOf(type), "Type"); dict.setStringForKey(this.getAbsolute(), "Remote"); if(symlink != null) { dict.setObjectForKey(symlink, "Symbolic Link"); } dict.setObjectForKey(attributes, "Attributes"); return dict.getSerialized(); } Path(final Path copy);  Path(final Path parent, final String name, final EnumSet<Type> type);  Path(final String absolute, final EnumSet<Type> type);  Path(final String absolute, final EnumSet<Type> type, final PathAttributes attributes);  Path(final Path parent, final String name, final EnumSet<Type> type, final PathAttributes attributes); @Override T serialize(final Serializer dict); @Override EnumSet<Type> getType(); void setType(final EnumSet<Type> type); boolean isVolume(); boolean isDirectory(); boolean isPlaceholder(); boolean isFile(); boolean isSymbolicLink(); @Override char getDelimiter(); Path getParent(); PathAttributes attributes(); void setAttributes(final PathAttributes attributes); Path withAttributes(final PathAttributes attributes); @Override String getName(); @Override String getAbsolute(); Path getSymlinkTarget(); void setSymlinkTarget(final Path target); @Override int hashCode(); @Override boolean equals(Object other); @Override String toString(); boolean isChild(final Path directory); }
Path extends AbstractPath implements Referenceable, Serializable { @Override public <T> T serialize(final Serializer dict) { dict.setStringForKey(String.valueOf(type), "Type"); dict.setStringForKey(this.getAbsolute(), "Remote"); if(symlink != null) { dict.setObjectForKey(symlink, "Symbolic Link"); } dict.setObjectForKey(attributes, "Attributes"); return dict.getSerialized(); } Path(final Path copy);  Path(final Path parent, final String name, final EnumSet<Type> type);  Path(final String absolute, final EnumSet<Type> type);  Path(final String absolute, final EnumSet<Type> type, final PathAttributes attributes);  Path(final Path parent, final String name, final EnumSet<Type> type, final PathAttributes attributes); @Override T serialize(final Serializer dict); @Override EnumSet<Type> getType(); void setType(final EnumSet<Type> type); boolean isVolume(); boolean isDirectory(); boolean isPlaceholder(); boolean isFile(); boolean isSymbolicLink(); @Override char getDelimiter(); Path getParent(); PathAttributes attributes(); void setAttributes(final PathAttributes attributes); Path withAttributes(final PathAttributes attributes); @Override String getName(); @Override String getAbsolute(); Path getSymlinkTarget(); void setSymlinkTarget(final Path target); @Override int hashCode(); @Override boolean equals(Object other); @Override String toString(); boolean isChild(final Path directory); static final char DELIMITER; }