@Test(dataProvider = "tokens") public void tokenize(final String pattern, final List<String> tokens) { final List<String> t = LocationFormatter.Builder.tokenize(pattern); Assert.assertEquals(t, tokens, String.format("%s != %s", t, tokens)); }
public String format(final Location location) { requireNonNull(location); return _formats.stream() .map(format -> format.format(location) .orElseThrow(() -> toError(location))) .collect(Collectors.joining()); }
LocationFormatter { public String format(final Location location) { requireNonNull(location); return _formats.stream() .map(format -> format.format(location) .orElseThrow(() -> toError(location))) .collect(Collectors.joining()); } }
LocationFormatter { public String format(final Location location) { requireNonNull(location); return _formats.stream() .map(format -> format.format(location) .orElseThrow(() -> toError(location))) .collect(Collectors.joining()); } private  LocationFormatter(final List<Format<Location>> formats); }
LocationFormatter { public String format(final Location location) { requireNonNull(location); return _formats.stream() .map(format -> format.format(location) .orElseThrow(() -> toError(location))) .collect(Collectors.joining()); } private  LocationFormatter(final List<Format<Location>> formats); static Builder builder(); String format(final Location location); String toPattern(); String format(final Latitude lat, final Longitude lon, final Length ele); String format(final Latitude lat, final Longitude lon); String format(final Latitude lat); String format(final Longitude lon); String format(final Length ele); @Override String toString(); static LocationFormatter ofPattern(final String pattern); }
LocationFormatter { public String format(final Location location) { requireNonNull(location); return _formats.stream() .map(format -> format.format(location) .orElseThrow(() -> toError(location))) .collect(Collectors.joining()); } private  LocationFormatter(final List<Format<Location>> formats); static Builder builder(); String format(final Location location); String toPattern(); String format(final Latitude lat, final Longitude lon, final Length ele); String format(final Latitude lat, final Longitude lon); String format(final Latitude lat); String format(final Longitude lon); String format(final Length ele); @Override String toString(); static LocationFormatter ofPattern(final String pattern); static final LocationFormatter ISO_HUMAN_LAT_LONG; static final LocationFormatter ISO_HUMAN_LON_LONG; static final LocationFormatter ISO_HUMAN_ELE_LONG; static final LocationFormatter ISO_HUMAN_LONG; static final LocationFormatter ISO_LAT_SHORT; static final LocationFormatter ISO_LAT_MEDIUM; static final LocationFormatter ISO_LAT_LONG; static final LocationFormatter ISO_LON_SHORT; static final LocationFormatter ISO_LON_MEDIUM; static final LocationFormatter ISO_LON_LONG; static final LocationFormatter ISO_ELE_SHORT; static final LocationFormatter ISO_ELE_MEDIUM; static final LocationFormatter ISO_ELE_LONG; static final LocationFormatter ISO_SHORT; static final LocationFormatter ISO_MEDIUM; static final LocationFormatter ISO_LONG; }