| 418 | } |
| 419 | |
| 420 | private final static class Builder |
| 421 | { |
| 422 | private final List<ImageSource> sources = new LinkedList<>(); |
| 423 | private String size = null; |
| 424 | |
| 425 | public Builder add(ImageSource source) |
| 426 | { |
| 427 | if (source != null) sources.add(source); |
| 428 | return this; |
| 429 | } |
| 430 | |
| 431 | @SuppressWarnings("unused") |
| 432 | public Builder size(String size) |
| 433 | { |
| 434 | this.size = size; |
| 435 | return this; |
| 436 | } |
| 437 | |
| 438 | public boolean hasSources() |
| 439 | { |
| 440 | return !sources.isEmpty(); |
| 441 | } |
| 442 | |
| 443 | public SourceSet build() |
| 444 | { |
| 445 | return new SourceSet(ImmutableList.copyOf(sources), Strings.nullToEmpty(size)); |
| 446 | } |
| 447 | } |
| 448 | |
| 449 | private final static Function<ImageSource, String> LIST_TO_URL_FUNC = new Function<SourceSet.ImageSource, String>() |
| 450 | { |
nothing calls this directly
no outgoing calls
no test coverage detected
searching dependent graphs…