the abstract factory method example in java api