@Test public void listsAlternativesCorrectly() throws Exception { UriMappingIterableImpl uriMapping = new UriMappingIterableImpl(ImmutableSet.of( "http: "http: "http: )); uriMapping.addLink("http: uriMapping.addLink("http: uriMapping.addLink("http: uriMapping.addLink("http: uriMapping.addLink("http: Set<String> setA = ImmutableSet.of("http: Set<String> setB = ImmutableSet.of("http: Set<String> setC = ImmutableSet.of("http: Set<String> setD = ImmutableSet.of("http: AlternativeUriNavigator alternativeURINavigator = new AlternativeUriNavigator(uriMapping); assertThat(ImmutableSet.copyOf(alternativeURINavigator.listAlternativeUris("http: assertThat(ImmutableSet.copyOf(alternativeURINavigator.listAlternativeUris("http: assertThat(ImmutableSet.copyOf(alternativeURINavigator.listAlternativeUris("http: assertThat(ImmutableSet.copyOf(alternativeURINavigator.listAlternativeUris("http: assertThat(ImmutableSet.copyOf(alternativeURINavigator.listAlternativeUris("http: assertThat(ImmutableSet.copyOf(alternativeURINavigator.listAlternativeUris("http: assertThat(ImmutableSet.copyOf(alternativeURINavigator.listAlternativeUris("http: assertThat(ImmutableSet.copyOf(alternativeURINavigator.listAlternativeUris("http: }
@Deprecated public List<String> listAlternativeUris(String uri) { String canonicalURI = uriMapping.getCanonicalURI(uri); List<String> alternativeURIs = getAlternativeUriMap().get(canonicalURI); if (alternativeURIs == null) { return Collections.singletonList(uri); } else { return alternativeURIs; } }
AlternativeUriNavigator { @Deprecated public List<String> listAlternativeUris(String uri) { String canonicalURI = uriMapping.getCanonicalURI(uri); List<String> alternativeURIs = getAlternativeUriMap().get(canonicalURI); if (alternativeURIs == null) { return Collections.singletonList(uri); } else { return alternativeURIs; } } }
AlternativeUriNavigator { @Deprecated public List<String> listAlternativeUris(String uri) { String canonicalURI = uriMapping.getCanonicalURI(uri); List<String> alternativeURIs = getAlternativeUriMap().get(canonicalURI); if (alternativeURIs == null) { return Collections.singletonList(uri); } else { return alternativeURIs; } } AlternativeUriNavigator(UriMappingIterable uriMapping); }
AlternativeUriNavigator { @Deprecated public List<String> listAlternativeUris(String uri) { String canonicalURI = uriMapping.getCanonicalURI(uri); List<String> alternativeURIs = getAlternativeUriMap().get(canonicalURI); if (alternativeURIs == null) { return Collections.singletonList(uri); } else { return alternativeURIs; } } AlternativeUriNavigator(UriMappingIterable uriMapping); @Deprecated List<String> listAlternativeUris(String uri); List<URI> listAlternativeUris(URI uri); @Deprecated boolean hasAlternativeUris(String uri); boolean hasAlternativeUris(URI uri); }
AlternativeUriNavigator { @Deprecated public List<String> listAlternativeUris(String uri) { String canonicalURI = uriMapping.getCanonicalURI(uri); List<String> alternativeURIs = getAlternativeUriMap().get(canonicalURI); if (alternativeURIs == null) { return Collections.singletonList(uri); } else { return alternativeURIs; } } AlternativeUriNavigator(UriMappingIterable uriMapping); @Deprecated List<String> listAlternativeUris(String uri); List<URI> listAlternativeUris(URI uri); @Deprecated boolean hasAlternativeUris(String uri); boolean hasAlternativeUris(URI uri);  }