code: @SuppressWarnings("unchecked")
      protected static <T extends ExpandableStringEnum<T>> Collection<T> values(Class<T> clazz) {
          // Make a copy of all values
          Collection<? extends ExpandableStringEnum<?>> values = new ArrayList<>(valuesByName.values());
  
          Collection<T> list = new HashSet<T>();
          for (ExpandableStringEnum<?> value : values) {
              if (value.getClass().isAssignableFrom(clazz)) {
                  list.add((T) value);
              }
          }
  
          return list;
      }
docs: Gets a collection of all known values to an expandable string enum type.
  @param clazz the class of the expandable string enum
  @param <T> the class of the expandable string enum
  @return a collection of all known values