/** * Adds the given base path to the set of members of this directory * if and only if this covariant file system node implements a directory. * * @param member The base path of the member to add. * @return Whether the member has been added or an equal member was * already present in the directory. * @throws NullPointerException if this covariant file system node does * not implement a directory. */ public boolean add(String member) { return getMembers().add(member); }
/** * Returns a set of the members of this directory or {@code null} if and * only if there is no directory archive entry mapped. * This is a bidirectional view: Any change is reflected in the set and * vice versa. */ @Override public @Nullable Set<String> getMembers() { if (!isType(DIRECTORY)) return members = null; final Set<String> m = members; return null != m ? m : (members = new LinkedHashSet<>()); }
node = ((FsCovariantNode<?>) node).getEntry(); final FsCovariantNode<FsArchiveEntry> special = new FsCovariantNode<>(ROOT_PATH); special.put(SPECIAL, driver.newEntry(ROOT_PATH, SPECIAL, node)); return special;
/** * Removes the given base path from the set of members of this directory * if and only if this covariant file system node implements a directory. * * @param member The base path of the member to remove. * @return Whether the member has been removed or no equal member was * present in the directory. * @throws NullPointerException if this covariant file system node does * not implement a directory. */ public boolean remove(String member) { return getMembers().remove(member); } }