A SetModelFactory is a ModelFactory that can wrap an SetFacet and produce a SetFacetModel for a given CharID
| 27 | * SetFacetModel for a given CharID |
| 28 | */ |
| 29 | public class SetModelFactory implements ModelFactory |
| 30 | { |
| 31 | /** |
| 32 | * The SetFacet for which this SetModelFactory can produce a ModelFactory. |
| 33 | */ |
| 34 | private final SetFacet<CharID, ?> facet; |
| 35 | |
| 36 | /** |
| 37 | * Constructs a new SetModelFactory for the given SetFacet. |
| 38 | * |
| 39 | * @param sf |
| 40 | * The SetFacet for which this SetModelFactory will produce |
| 41 | * ModelFactory objects |
| 42 | */ |
| 43 | public SetModelFactory(SetFacet<CharID, ?> sf) |
| 44 | { |
| 45 | facet = sf; |
| 46 | } |
| 47 | |
| 48 | @Override |
| 49 | public SetFacetModel<?> generate(CharID id) |
| 50 | { |
| 51 | return new SetFacetModel<>(id, facet); |
| 52 | } |
| 53 | } |
nothing calls this directly
no outgoing calls
no test coverage detected