/** * creates a new {@link UrlPath} from an array of elements * * @param segments the array of elements * @throws IllegalArgumentException if one or more elements couldn't parsed */ private URLPath(String... segments) throws IllegalArgumentException { this.segments = parse(segments); }