code: private static List<Length>  parseLengthList(String val) throws SVGParseException
     {
        if (val.length() == 0)
           throw new SVGParseException("Invalid length list (empty string)");
  
        List<Length>  coords = new ArrayList<>(1);
  
        TextScanner scan = new TextScanner(val);
        scan.skipWhitespace();
  
        while (!scan.empty())
        {
           float scalar = scan.nextFloat();
           if (Float.isNaN(scalar))
              throw new SVGParseException("Invalid length list value: "+scan.ahead());
           Unit  unit = scan.nextUnit();
           if (unit == null)
              unit = Unit.px;
           coords.add(new Length(scalar, unit));
           scan.skipCommaWhitespace();
        }
        return coords;
     }
docs: /*
  Parse a list of Length/Coords