MCPcopy Index your code
hub / github.com/PCGen/pcgen / UserContent

Class UserContent

code/src/java/pcgen/cdom/content/UserContent.java:28–110  ·  view source on GitHub ↗

A UserContent manages common functions for user defined content within PCGen.

Source from the content-addressed store, hash-verified

26 * A UserContent manages common functions for user defined content within PCGen.
27 */
28public abstract class UserContent implements Loadable
29{
30
31 /**
32 * The unique name of this UserContent.
33 */
34 private String name;
35
36 /**
37 * The source URI where this UserContent was originally defined
38 */
39 private URI sourceURI;
40
41 /**
42 * A String representing an explanation for the content described by this
43 * UserContent.
44 */
45 private String explanation;
46
47 @Override
48 public void setName(String name)
49 {
50 if (name==null)
51 {
52 System.out.println("Name cannot be null!");
53 return;
54 }
55 this.name = name;
56 }
57
58 @Override
59 public String getKeyName()
60 {
61 return name;
62 }
63
64 @Override
65 public void setSourceURI(URI source)
66 {
67 sourceURI = source;
68 }
69
70 @Override
71 public URI getSourceURI()
72 {
73 return sourceURI;
74 }
75
76 /**
77 * Sets the Explanation for this UserContent. This is intended to be a user
78 * understood String; it is not processed by PCGen.
79 *
80 * @param value
81 * The Explanation for this UserContent
82 */
83 public void setExplanation(String value)
84 {
85 Objects.requireNonNull(value, "Explanation may not be null");

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected