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)
| 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 | } |
no outgoing calls