docs: @Nullable
      @SuppressWarnings("unchecked")
      public <T extends Directory> T getFirstDirectoryOfType(@NotNull Class<T> type)
      {
          for (Directory dir : _directories) {
              if (type.isAssignableFrom(dir.getClass()))
                  return (T)dir;
          }
          return null;
      }