Example #1
0
 public BranchPage addBranch(String choice, Page... childPages) {
   PageList childPageList = new PageList(childPages);
   for (Page page : childPageList) {
     page.setParentKey(choice);
   }
   mBranches.add(new Branch(choice, childPageList));
   return this;
 }
Example #2
0
  public BranchPage addBranch(String[] choices, String parentKey, Page... childPages) {
    PageList childPageList = new PageList(childPages);
    for (Page page : childPageList) {
      page.setParentKey(parentKey);
    }

    for (int i = 0; i < choices.length; i++) {
      mBranches.add(new Branch(choices[i], childPageList));
    }

    return this;
  }