DeityToken is a Primitive that includes the Domains granted by the PC's Deity.
| 38 | * DeityToken is a Primitive that includes the Domains granted by the PC's Deity. |
| 39 | */ |
| 40 | public class DeityToken implements PrimitiveToken<Domain> |
| 41 | { |
| 42 | |
| 43 | private static final Class<Domain> DOMAIN_CLASS = Domain.class; |
| 44 | |
| 45 | @Override |
| 46 | public boolean initialize(LoadContext context, Class<Domain> cl, String value, String args) |
| 47 | { |
| 48 | return (value == null) && (args == null); |
| 49 | } |
| 50 | |
| 51 | @Override |
| 52 | public String getTokenName() |
| 53 | { |
| 54 | return "DEITY"; |
| 55 | } |
| 56 | |
| 57 | @Override |
| 58 | public Class<Domain> getReferenceClass() |
| 59 | { |
| 60 | return DOMAIN_CLASS; |
| 61 | } |
| 62 | |
| 63 | @Override |
| 64 | public String getLSTformat(boolean useAny) |
| 65 | { |
| 66 | return getTokenName(); |
| 67 | } |
| 68 | |
| 69 | @Override |
| 70 | public GroupingState getGroupingState() |
| 71 | { |
| 72 | return GroupingState.ANY; |
| 73 | } |
| 74 | |
| 75 | @Override |
| 76 | public boolean equals(Object obj) |
| 77 | { |
| 78 | return obj instanceof DeityToken; |
| 79 | } |
| 80 | |
| 81 | @Override |
| 82 | public int hashCode() |
| 83 | { |
| 84 | return 8635; |
| 85 | } |
| 86 | |
| 87 | @Override |
| 88 | public <R> Collection<R> getCollection(PlayerCharacter pc, Converter<Domain, R> c) |
| 89 | { |
| 90 | HashSet<R> returnSet = new HashSet<>(); |
| 91 | Deity deity = (Deity) ChannelUtilities |
| 92 | .readControlledChannel(pc.getCharID(), CControl.DEITYINPUT); |
| 93 | if (deity == null) |
| 94 | { |
| 95 | return returnSet; |
| 96 | } |
| 97 | CDOMReference<DomainList> list = Deity.DOMAINLIST; |
nothing calls this directly
no outgoing calls
no test coverage detected