public DeterministicKey deriveNextChild(ImmutableList<ChildNumber> parentPath,boolean relative,boolean createParent,boolean privateDerivation){
  DeterministicKey parent=get(parentPath,relative,createParent);
  int nAttempts=0;
  while (nAttempts++ < HDKeyDerivation.MAX_CHILD_DERIVATION_ATTEMPTS) {
    try {
      ChildNumber createChildNumber=getNextChildNumberToDerive(parent.getPath(),privateDerivation);
      return deriveChild(parent,createChildNumber);
    }
 catch (    HDDerivationException ignore) {
    }
  }
  throw new HDDerivationException("Maximum number of child derivation attempts reached, this is probably an indication of a bug.");
}

public DeterministicKey deriveNextChild ( ImmutableList < ChildNumber > parentPath , boolean relative , boolean createParent , boolean privateDerivation ) { DeterministicKey parent = get ( parentPath , relative , createParent ) ; int nAttempts = 0 ; while ( nAttempts ++ < HDKeyDerivation . MAX_CHILD_DERIVATION_ATTEMPTS ) { try { ChildNumber createChildNumber = getNextChildNumberToDerive ( parent . getPath ( ) , privateDerivation ) ; return deriveChild ( parent , createChildNumber ) ; } catch ( HDDerivationException ignore ) { } } throw new HDDerivationException ( "Maximum number of child derivation attempts reached, this is probably an indication of a bug." ) ; }
extends the tree by calculating the next key that hangs off the given parent path . for example , if you pass a path of 1 / 2 here and there are already keys 1 / 2 / 1 and 1 / 2 / 2 then it will derive 1 / 2 / 3 .
