package hirondelle.fish.exercise.multivalued;
import java.util.*;
import java.math.BigDecimal;
import hirondelle.web4j.security.SafeText;
public final class ToppingsEtc {
public ToppingsEtc(TimeZone aTimeZone, Locale aLocale){
fTimeZone = aTimeZone;
fLocale = aLocale;
}
public Collection<SafeText> getPizzaToppings(){
return Arrays.asList(SafeText.from("Anchovies"), SafeText.from("Salami"));
}
public Collection<SafeText> getArtists(){
return Arrays.asList(SafeText.from("Tom Thomson"), SafeText.from("Alex Janvier"), SafeText.from("Mary Pratt"));
}
public Collection<Integer> getAge(){
return Arrays.asList(new Integer(10), new Integer(100), new Integer(20) );
}
public Collection<BigDecimal> getDesiredSalary(){
return Arrays.asList(
new BigDecimal("10000.00"),
new BigDecimal("30000.00"),
new BigDecimal("100000.00")
);
}
public Collection<Date> getBirthDate(){
Calendar one = new GregorianCalendar(fTimeZone, fLocale);
one.set(Calendar.YEAR, 1969);
one.set(Calendar.MONTH, Calendar.DECEMBER);
one.set(Calendar.DAY_OF_MONTH, 31);
one.set(Calendar.HOUR, 0);
one.set(Calendar.MINUTE, 0);
one.set(Calendar.SECOND, 0);
one.set(Calendar.MILLISECOND, 0);
one.set(Calendar.AM_PM, Calendar.AM);
Calendar two = new GregorianCalendar(fTimeZone, fLocale);
two.set(Calendar.YEAR, 1970);
two.set(Calendar.MONTH, Calendar.JANUARY);
two.set(Calendar.DAY_OF_MONTH, 1);
two.set(Calendar.HOUR, 0);
two.set(Calendar.MINUTE, 0);
two.set(Calendar.SECOND, 0);
two.set(Calendar.MILLISECOND, 0);
two.set(Calendar.AM_PM, Calendar.AM);
return Arrays.asList( one.getTime(), two.getTime() );
}
private TimeZone fTimeZone;
private Locale fLocale;
}