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

Method isVisibleTo

code/src/java/pcgen/util/enumeration/Visibility.java:53–67  ·  view source on GitHub ↗

Determine if this visibility can be seen in the supplied view level. @param view The view level. @return true if the visibility can be viewed, false if not.

(View view)

Source from the content-addressed store, hash-verified

51 * @return true if the visibility can be viewed, false if not.
52 */
53 public boolean isVisibleTo(View view)
54 {
55 return switch (view)
56 {
57 case ALL -> true;
58 case HIDDEN_DISPLAY -> (this == Visibility.HIDDEN || this == Visibility.OUTPUT_ONLY);
59 case HIDDEN_EXPORT -> (this == Visibility.HIDDEN || this == Visibility.DISPLAY_ONLY);
60 case VISIBLE_EXPORT -> (this == Visibility.DEFAULT || this == Visibility.OUTPUT_ONLY);
61 case VISIBLE_DISPLAY -> (this == Visibility.DEFAULT || this == Visibility.DISPLAY_ONLY);
62 // All enum cases are covered so no default
63 };
64 /*
65 * TODO Need to deal with QUALIFY
66 */
67 }
68
69}

Callers 8

appendFactsMethod · 0.95
activateMethod · 0.95
isVisibleMethod · 0.95
isVisibleMethod · 0.95
resolveMethod · 0.95
countVisibleAbilityMethod · 0.95
resolveMethod · 0.95

Calls

no outgoing calls

Tested by 1

resolveMethod · 0.76