class AttributeType implements Named, Comparable<AttributeType<T>>, Serializable {

  @SuppressWarnings("unchecked")
  @FromString
  public static <T> AttributeType<T> of(String name) {
    ArgChecker.notEmpty(name, "name");
    return (AttributeType<T>) INSTANCES.computeIfAbsent(name, key -> new AttributeType<T>(key));
  }

  @SuppressWarnings("unchecked") private  AttributeType(String name);
  @SuppressWarnings("unchecked") private  AttributeType(String name, Class<T> type);

}