@Override public PathComponent build() { int size = this.componentBuilders.size(); List<PathComponent> components = new ArrayList<PathComponent>(size); for (PathComponentBuilder componentBuilder : this.componentBuilders) { PathComponent pathComponent = componentBuilder.build(); if (pathComponent != null) { components.add(pathComponent); } } if (components.isEmpty()) { return HierarchicalUriComponents.NULL_PATH_COMPONENT; } if (components.size() == 1) { return components.get(0); } return new HierarchicalUriComponents.PathComponentComposite(components); }
@Override public PathComponent build() { int size = this.builders.size(); List<PathComponent> components = new ArrayList<PathComponent>(size); for (PathComponentBuilder componentBuilder : this.builders) { PathComponent pathComponent = componentBuilder.build(); if (pathComponent != null) { components.add(pathComponent); } } if (components.isEmpty()) { return HierarchicalUriComponents.NULL_PATH_COMPONENT; } if (components.size() == 1) { return components.get(0); } return new HierarchicalUriComponents.PathComponentComposite(components); }
public PathComponent build() { int size = this.componentBuilders.size(); List<PathComponent> components = new ArrayList<PathComponent>(size); for (PathComponentBuilder componentBuilder : this.componentBuilders) { PathComponent pathComponent = componentBuilder.build(); if (pathComponent != null) { components.add(pathComponent); } } if (components.isEmpty()) { return HierarchicalUriComponents.NULL_PATH_COMPONENT; } if (components.size() == 1) { return components.get(0); } return new HierarchicalUriComponents.PathComponentComposite(components); }
@Override public PathComponent build() { return (this.pathSegments.isEmpty() ? null : new HierarchicalUriComponents.PathSegmentComponent(this.pathSegments)); }
public PathComponent build() { return (this.pathSegments.isEmpty() ? null : new HierarchicalUriComponents.PathSegmentComponent(this.pathSegments)); }
PathComponent build();