class ScheduledDropwizardReporter implements MetricReporter, Scheduled, Reporter, CharacterFilter {

	@Override
	public String filterCharacters(String metricName) {
		char[] chars = null;
		final int strLen = metricName.length();
		int pos = 0;

		for (int i = 0; i < strLen; i++) {
			final char c = metricName.charAt(i);
			switch (c) {
				case '.':
					if (chars == null) {
						chars = metricName.toCharArray();
					}
					chars[pos++] = '-';
					break;
				case '"':
					if (chars == null) {
						chars = metricName.toCharArray();
					}
					break;

				default:
					if (chars != null) {
						chars[pos] = c;
					}
					pos++;
			}
		}

		return chars == null ? metricName : new String(chars, 0, pos);
	}

	protected  ScheduledDropwizardReporter();

}