public static VersionCompatibility fromVersionList(List<String> versions) {
        Node root = new Node();
        for (String spec : versions) {
            String[] parts = spec.split("\\.");
            if (parts.length < 1 || parts.length > 3)
                throw new IllegalArgumentException("Each spec must have 1 to 3 parts, but found '" + spec + "'");

            boolean wildcard = false;
            Node node = root;
            for (int i = 0; i < 3; i++) {
                String part = i < parts.length ? parts[i] : wildcard ? null : "0";
                if (wildcard && part != null && ! part.equals("*"))
                    throw new IllegalArgumentException("Wildcard parts may only have wildcard children, but found '" + spec + "'");

                if ("*".equals(part)) {
                    wildcard = true;
                    if (node.children.isEmpty())
                        node = node.children.computeIfAbsent(-1, __ -> new Node());
                    else
                        throw new IllegalArgumentException("Wildcards may not have siblings, but got: " + versions);
                }
                else if (part != null) {
                    int number = Integer.parseInt(part);
                    if (number < 0)
                        throw new IllegalArgumentException("Version parts must be non-negative, but found '" + spec + "'");
                    if (node.children.containsKey(-1))
                        throw new IllegalArgumentException("Wildcards may not have siblings, but got: " + versions);
                    if (i < 2)
                        node = node.children.computeIfAbsent(number, __ -> new Node());
                    else if (node.children.put(number, new Node()) != null)
                        throw new IllegalArgumentException("Duplicate element '" + spec + "'");
                }
            }
        }
        return new VersionCompatibility(root);
    }
Logic for what platform and compile versions are incompatible.

This class is instantiated with a list of versions which are only compatible with other versions
that are not older than themselves. Each entry in this list is represented by a string, and any
major, minor or micro with the value @{code *} means all versions are such boundaries.
Versions A, B are incompatible iff. there exists an incompatibility boundary X such that
(A &ge; X) &ne; (B &ge; X).

@author jonmv
component/src/main/java/com/yahoo/component/VersionCompatibility.java