KeySpaceDirectory { public void toTree(Writer out) throws IOException { toTree(out, this, 0, false, new BitSet()); } KeySpaceDirectory(@Nonnull String name, @Nonnull KeyType keyType, @Nullable Object value,
                             @Nullable Function<KeySpacePath, KeySpacePath> wrapper);  KeySpaceDirectory(@Nonnull String name, @Nonnull KeyType keyType, @Nullable Function<KeySpacePath, KeySpacePath> wrapper);  KeySpaceDirectory(@Nonnull String name, @Nonnull KeyType keyType);  KeySpaceDirectory(@Nonnull String name, @Nonnull KeyType keyType, @Nullable Object value); int depth(); @Nonnull CompletableFuture<ResolvedKeySpacePath> findChildForValue(@Nonnull FDBRecordContext context,
                                                                     @Nullable ResolvedKeySpacePath parent,
                                                                     @Nullable Object value); @Nonnull KeySpaceDirectory addSubdirectory(@Nonnull KeySpaceDirectory subdirectory); boolean isLeaf(); @Nonnull KeySpaceDirectory getSubdirectory(@Nonnull String name); @Nonnull List<KeySpaceDirectory> getSubdirectories(); @Nullable KeySpaceDirectory getParent(); @Nonnull String getName(); @Nonnull String getNameInTree(); @Nonnull KeyType getKeyType(); @Nullable Object getValue(); String toPathString(); @Override String toString(); void toTree(Writer out); static final Object ANY_VALUE; }
@Test public void testToTree() { KeySpace keySpace = new KeySpace( new KeySpaceDirectory("state", KeyType.STRING) .addSubdirectory(new KeySpaceDirectory("office_id", KeyType.LONG) .addSubdirectory(new KeySpaceDirectory("employees", KeyType.STRING, "E") .addSubdirectory(new KeySpaceDirectory("employee_id", KeyType.LONG))) .addSubdirectory(new KeySpaceDirectory("inventory", KeyType.STRING, "I") .addSubdirectory(new KeySpaceDirectory("stock_id", KeyType.LONG))) .addSubdirectory(new KeySpaceDirectory("sales", KeyType.STRING, "S") .addSubdirectory(new KeySpaceDirectory("transaction_id", KeyType.UUID)) .addSubdirectory(new KeySpaceDirectory("layaways", KeyType.NULL) .addSubdirectory(new KeySpaceDirectory("transaction_id", KeyType.UUID)))))); System.out.println(keySpace.toString()); }