MCPcopy Create free account
hub / github.com/GateNLP/gate-core / isLoggedOnce

Method isLoggedOnce

src/main/java/gate/Utils.java:826–832  ·  view source on GitHub ↗

Check if a message has already been logged or shown. This does not log or show anything but only stores the message as one that has been shown already if necessary and returns if the message has been shown or not. @param message - the message that should only be logged or shown once @return - true

(String message)

Source from the content-addressed store, hash-verified

824 *
825 */
826 public static boolean isLoggedOnce(String message) {
827 boolean isThere = alreadyLoggedMessages.contains(message);
828 if(!isThere) {
829 alreadyLoggedMessages.add(message);
830 }
831 return isThere;
832 }
833
834 private static final Set<String> alreadyLoggedMessages =
835 Collections.synchronizedSet(new HashSet<String>());

Callers

nothing calls this directly

Calls 2

addMethod · 0.65
containsMethod · 0.45

Tested by

no test coverage detected