@Test public void testBuildUrl1() { TileUrlBuilder builder = new SimpleTmsUrlBuilder(EXTENSION); String url = builder.buildUrl(new TileCode(1, 2, 3), BASE_TMS_URL); Assert.assertEquals(EXPECTED, url); }
@Override public String buildUrl(TileCode tileCode, String baseTmsUrl) { StringBuilder builder = new StringBuilder(baseTmsUrl); if (!baseTmsUrl.endsWith("/")) { builder.append("/"); } builder.append(tileCode.getTileLevel()); builder.append("/"); builder.append(tileCode.getX()); builder.append("/"); builder.append(tileCode.getY()); builder.append(extension); return builder.toString(); }
SimpleTmsUrlBuilder implements TileUrlBuilder { @Override public String buildUrl(TileCode tileCode, String baseTmsUrl) { StringBuilder builder = new StringBuilder(baseTmsUrl); if (!baseTmsUrl.endsWith("/")) { builder.append("/"); } builder.append(tileCode.getTileLevel()); builder.append("/"); builder.append(tileCode.getX()); builder.append("/"); builder.append(tileCode.getY()); builder.append(extension); return builder.toString(); } }
SimpleTmsUrlBuilder implements TileUrlBuilder { @Override public String buildUrl(TileCode tileCode, String baseTmsUrl) { StringBuilder builder = new StringBuilder(baseTmsUrl); if (!baseTmsUrl.endsWith("/")) { builder.append("/"); } builder.append(tileCode.getTileLevel()); builder.append("/"); builder.append(tileCode.getX()); builder.append("/"); builder.append(tileCode.getY()); builder.append(extension); return builder.toString(); } SimpleTmsUrlBuilder(String extension); }
SimpleTmsUrlBuilder implements TileUrlBuilder { @Override public String buildUrl(TileCode tileCode, String baseTmsUrl) { StringBuilder builder = new StringBuilder(baseTmsUrl); if (!baseTmsUrl.endsWith("/")) { builder.append("/"); } builder.append(tileCode.getTileLevel()); builder.append("/"); builder.append(tileCode.getX()); builder.append("/"); builder.append(tileCode.getY()); builder.append(extension); return builder.toString(); } SimpleTmsUrlBuilder(String extension); @Override String buildUrl(TileCode tileCode, String baseTmsUrl); }
SimpleTmsUrlBuilder implements TileUrlBuilder { @Override public String buildUrl(TileCode tileCode, String baseTmsUrl) { StringBuilder builder = new StringBuilder(baseTmsUrl); if (!baseTmsUrl.endsWith("/")) { builder.append("/"); } builder.append(tileCode.getTileLevel()); builder.append("/"); builder.append(tileCode.getX()); builder.append("/"); builder.append(tileCode.getY()); builder.append(extension); return builder.toString(); } SimpleTmsUrlBuilder(String extension); @Override String buildUrl(TileCode tileCode, String baseTmsUrl);  }