@Test public void testGetSetStatementIndices() { SetStatementTree tree = new SetStatementTree(); assertThat(tree.getSetStatementIndices(), empty()); tree.addSetStatementIndex(1); assertThat(tree.getSetStatementIndices(), contains(1)); tree.getOrAddSubtree("foo").addSetStatementIndex(2); assertThat(tree.getSetStatementIndices(), containsInAnyOrder(1, 2)); tree.replaceSubtree("foo").addSetStatementIndex(3); assertThat(tree.getSetStatementIndices(), containsInAnyOrder(1, 3)); }
public @Nonnull Set<Integer> getSetStatementIndices() { ImmutableSet.Builder<Integer> setStatements = ImmutableSet.builder(); addSetStatementsTo(setStatements); return setStatements.build(); }
SetStatementTree { public @Nonnull Set<Integer> getSetStatementIndices() { ImmutableSet.Builder<Integer> setStatements = ImmutableSet.builder(); addSetStatementsTo(setStatements); return setStatements.build(); } }
SetStatementTree { public @Nonnull Set<Integer> getSetStatementIndices() { ImmutableSet.Builder<Integer> setStatements = ImmutableSet.builder(); addSetStatementsTo(setStatements); return setStatements.build(); } SetStatementTree(); private  SetStatementTree(@Nullable SetStatementTree parent); }
SetStatementTree { public @Nonnull Set<Integer> getSetStatementIndices() { ImmutableSet.Builder<Integer> setStatements = ImmutableSet.builder(); addSetStatementsTo(setStatements); return setStatements.build(); } SetStatementTree(); private  SetStatementTree(@Nullable SetStatementTree parent); void addSetStatementIndex(int setStatementIndex); @Nonnull SetStatementTree getOrAddSubtree(String partialStatementText); @Nullable SetStatementTree getParent(); @Nonnull Set<Integer> getSetStatementIndices(); SetStatementTree replaceSubtree(String partialStatementText); }
SetStatementTree { public @Nonnull Set<Integer> getSetStatementIndices() { ImmutableSet.Builder<Integer> setStatements = ImmutableSet.builder(); addSetStatementsTo(setStatements); return setStatements.build(); } SetStatementTree(); private  SetStatementTree(@Nullable SetStatementTree parent); void addSetStatementIndex(int setStatementIndex); @Nonnull SetStatementTree getOrAddSubtree(String partialStatementText); @Nullable SetStatementTree getParent(); @Nonnull Set<Integer> getSetStatementIndices(); SetStatementTree replaceSubtree(String partialStatementText);  }