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

Class ListFacetView

code/src/java/pcgen/cdom/meta/ListFacetView.java:25–70  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

23import pcgen.cdom.facet.base.AbstractSourcedListFacet;
24
25public class ListFacetView<T> implements FacetView<T>
26{
27
28 private AbstractSourcedListFacet<CharID, T> facet;
29
30 ListFacetView(AbstractSourcedListFacet<CharID, T> facet)
31 {
32 this.facet = facet;
33 }
34
35 @Override
36 public Collection<T> getSet(CharID id)
37 {
38 return facet.getSet(id);
39 }
40
41 @Override
42 public Collection<Object> getSources(CharID id, T obj)
43 {
44 return facet.getSources(id, obj);
45 }
46
47 @Override
48 public Object[] getChildren()
49 {
50 return facet.getDataFacetChangeListeners();
51 }
52
53 @Override
54 public String getDescription()
55 {
56 return facet.getClass().getSimpleName();
57 }
58
59 @Override
60 public boolean represents(Object src)
61 {
62 return facet.equals(src);
63 }
64
65 @Override
66 public String toString()
67 {
68 return "Facet: " + facet.getClass().getSimpleName();
69 }
70}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected