@Test public void objectListConverter() { Calendar cal = Calendar.getInstance(); cal.set(2003, 4, 20, 17, 55); FileNamePattern fnp = new FileNamePattern("foo-%d{yyyy.MM.dd}-%i.txt", context); assertEquals("foo-2003.05.20-79.txt", fnp.convertMultipleArguments(cal .getTime(), 79)); }
public String convertMultipleArguments(Object... objectList) { StringBuilder buf = new StringBuilder(); Converter<Object> c = headTokenConverter; while (c != null) { if (c instanceof MonoTypedConverter) { MonoTypedConverter monoTyped = (MonoTypedConverter) c; for (Object o : objectList) { if (monoTyped.isApplicable(o)) { buf.append(c.convert(o)); } } } else { buf.append(c.convert(objectList)); } c = c.getNext(); } return buf.toString(); }
FileNamePattern extends ContextAwareBase { public String convertMultipleArguments(Object... objectList) { StringBuilder buf = new StringBuilder(); Converter<Object> c = headTokenConverter; while (c != null) { if (c instanceof MonoTypedConverter) { MonoTypedConverter monoTyped = (MonoTypedConverter) c; for (Object o : objectList) { if (monoTyped.isApplicable(o)) { buf.append(c.convert(o)); } } } else { buf.append(c.convert(objectList)); } c = c.getNext(); } return buf.toString(); } }
FileNamePattern extends ContextAwareBase { public String convertMultipleArguments(Object... objectList) { StringBuilder buf = new StringBuilder(); Converter<Object> c = headTokenConverter; while (c != null) { if (c instanceof MonoTypedConverter) { MonoTypedConverter monoTyped = (MonoTypedConverter) c; for (Object o : objectList) { if (monoTyped.isApplicable(o)) { buf.append(c.convert(o)); } } } else { buf.append(c.convert(objectList)); } c = c.getNext(); } return buf.toString(); } FileNamePattern(String patternArg, Context contextArg); }
FileNamePattern extends ContextAwareBase { public String convertMultipleArguments(Object... objectList) { StringBuilder buf = new StringBuilder(); Converter<Object> c = headTokenConverter; while (c != null) { if (c instanceof MonoTypedConverter) { MonoTypedConverter monoTyped = (MonoTypedConverter) c; for (Object o : objectList) { if (monoTyped.isApplicable(o)) { buf.append(c.convert(o)); } } } else { buf.append(c.convert(objectList)); } c = c.getNext(); } return buf.toString(); } FileNamePattern(String patternArg, Context contextArg); String toString(); @Override int hashCode(); @Override boolean equals(Object obj); DateTokenConverter<Object> getPrimaryDateTokenConverter(); IntegerTokenConverter getIntegerTokenConverter(); boolean hasIntegerTokenCOnverter(); String convertMultipleArguments(Object... objectList); String convert(Object o); String convertInt(int i); void setPattern(String pattern); String getPattern(); String toRegexForFixedDate(Date date); String toRegex(); String toRegex(boolean capturePrimaryDate, boolean captureInteger); }
FileNamePattern extends ContextAwareBase { public String convertMultipleArguments(Object... objectList) { StringBuilder buf = new StringBuilder(); Converter<Object> c = headTokenConverter; while (c != null) { if (c instanceof MonoTypedConverter) { MonoTypedConverter monoTyped = (MonoTypedConverter) c; for (Object o : objectList) { if (monoTyped.isApplicable(o)) { buf.append(c.convert(o)); } } } else { buf.append(c.convert(objectList)); } c = c.getNext(); } return buf.toString(); } FileNamePattern(String patternArg, Context contextArg); String toString(); @Override int hashCode(); @Override boolean equals(Object obj); DateTokenConverter<Object> getPrimaryDateTokenConverter(); IntegerTokenConverter getIntegerTokenConverter(); boolean hasIntegerTokenCOnverter(); String convertMultipleArguments(Object... objectList); String convert(Object o); String convertInt(int i); void setPattern(String pattern); String getPattern(); String toRegexForFixedDate(Date date); String toRegex(); String toRegex(boolean capturePrimaryDate, boolean captureInteger);  }