a factory shop specification implementation in Java