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

Class StringManager

PCGen-base/code/src/java/pcgen/base/format/StringManager.java:32–113  ·  view source on GitHub ↗

A StringManager is a FormatManager for dealing with String objects.

Source from the content-addressed store, hash-verified

30 * A StringManager is a FormatManager for dealing with String objects.
31 */
32public class StringManager implements FormatManager<String>, ComparableManager<String>
33{
34
35 /**
36 * Converts the given String to an object of the type processed by this
37 * FormatManager.
38 */
39 @Override
40 public String convert(String s)
41 {
42 return Objects.requireNonNull(s);
43 }
44
45 /**
46 * Converts the given String to an Indirect containing an object of the type
47 * processed by this FormatManager.
48 */
49 @Override
50 public Indirect<String> convertIndirect(String s)
51 {
52 return new BasicIndirect<>(this, Objects.requireNonNull(s));
53 }
54
55 /**
56 * "Unconverts" the object (converts the object to a "serializable" String
57 * format that can be reinterpreted by the convert* methods).
58 */
59 @Override
60 public String unconvert(String s)
61 {
62 return Objects.requireNonNull(s);
63 }
64
65 /**
66 * The Class that this FormatManager can convert or unconvert.
67 */
68 @Override
69 public Class<String> getManagedClass()
70 {
71 return String.class;
72 }
73
74 /**
75 * The String used to refer to this format in files like the variable
76 * definition file.
77 */
78 @Override
79 public String getIdentifierType()
80 {
81 return "STRING";
82 }
83
84 @Override
85 public int hashCode()
86 {
87 return 987;
88 }
89

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected