Class Warnings



  • public class Warnings
    extends Object
    Static methods related to warnings.
    • Constructor Detail

      • Warnings

        public Warnings()
    • Method Detail

      • printOnce

        public static void printOnce(String message)
        Prints a message once to System.err. A unique string will only be printed once per session. This is intended for cases where a developer should be alerted to a possible problem, but the console should not be flooded with messages. Also the "problem" is one that only deserves a warning -- not an exception.
      • println

        public static void println(String text,
                                   long delay)
        Prints this message to the console, but only once every so often.

        This is intended to prevent the console from being flooded with warning messages for a frequently occurring problem/situation.

        Parameters:
        text - the message to print.
        delay - the number of milliseconds to wait before another message may be printed.