code: public int getParentTransactionDepthInBlocks() {
          if (getParentTransaction() != null) {
              TransactionConfidence confidence = getParentTransaction().getConfidence();
              if (confidence.getConfidenceType() == TransactionConfidence.ConfidenceType.BUILDING) {
                  return confidence.getDepthInBlocks();
              }
          }
          return -1;
      }
docs: Returns the depth in blocks of the parent tx.
  
  <p>If the transaction appears in the top block, the depth is one. If it's anything else (pending, dead, unknown)
  then -1.</p>
  @return The tx depth or -1.