code: private void getPolicyNodes(int depth, Set<PolicyNodeImpl> set) {
          // if we've reached the desired depth, then return ourself
          if (mDepth == depth) {
              set.add(this);
          } else {
              for (PolicyNodeImpl node : mChildren) {
                  node.getPolicyNodes(depth, set);
              }
          }
      }
docs: Add all nodes at depth depth to set and return the Set.
  Internal recursion helper.