code: public double getMaxDepth(@NonNull POS partOfSpeech) {
          if (maxDepths[partOfSpeech.ordinal()] == -1) {
              synchronized (maxDepths) {
                  if (maxDepths[partOfSpeech.ordinal()] == -1) {
                      double max = 0d;
                      for (Synset synset : getSynsets()) {
                          if (synset.getPOS() == partOfSpeech) {
                              max = Math.max(max, synset.depth() - 1);
                          }
                      }
                      maxDepths[partOfSpeech.ordinal()] = max;
                  }
              }
          }
          return maxDepths[partOfSpeech.ordinal()];
      }
docs: Gets max depth.
  
  @param partOfSpeech the part of speech
  @return the max depth