MCPcopy Create free account
hub / github.com/PCGen/pcgen / SetModelFactory

Class SetModelFactory

code/src/java/pcgen/output/factory/SetModelFactory.java:29–53  ·  view source on GitHub ↗

A SetModelFactory is a ModelFactory that can wrap an SetFacet and produce a SetFacetModel for a given CharID

Source from the content-addressed store, hash-verified

27 * SetFacetModel for a given CharID
28 */
29public 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}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected