public static ParsedType wsetOf(ParsedType vt) {
        assert(vt != null);
        if (vt.getVariant() != Variant.BUILTIN) {
            throw new IllegalArgumentException("weightedset of complex type '" + vt + "' is not supported");
        }
        switch (vt.name()) {
            // allowed types:
        case "bool":
        case "byte":
        case "int":
        case "long":
        case "string":
        case "uri":
            break;
        case "predicate":
        case "raw":
        case "tag":
            throw new IllegalArgumentException("weightedset of complex type '" + vt + "' is not supported");
        case "float16":
        case "float":
        case "double":
            throw new IllegalArgumentException("weightedset of inexact type '" + vt + "' is not supported");
        default:
            throw new IllegalArgumentException("weightedset of unknown type '" + vt + "' is not supported");
        }
        return new ParsedType("weightedset<" + vt.name() + ">", Variant.WSET, vt);
    }
This class holds the extracted information after parsing a type
declaration (typically for a field).  Since types can be complex,
struct names (known or unknown), or even document names, this class
is somewhat complicated.
@author arnej27959
config-model/src/main/java/com/yahoo/schema/parser/ParsedType.java