docs: public TransactionConfidence getOrCreate(Sha256Hash hash) {
          checkNotNull(hash);
          lock.lock();
          try {
              WeakConfidenceReference reference = table.get(hash);
              if (reference != null) {
                  TransactionConfidence confidence = reference.get();
                  if (confidence != null)
                      return confidence;
              }
              TransactionConfidence newConfidence = confidenceFactory.createConfidence(hash);
              table.put(hash, new WeakConfidenceReference(newConfidence, referenceQueue));
              return newConfidence;
          } finally {
              lock.unlock();
          }
      }