Class DefaultLoggerGroup<T>

    • Method Detail

      • hasLogger

        public boolean hasLogger​(String name)
        Checks if the logger with the provided name already exists.
        Parameters:
        name - the name
        Returns:
        true, if successful
      • logger

        public Optional<Tlogger​(String name)
        Gets the logger if it exists.
        Parameters:
        name - the name
        Returns:
        the logger
      • computeIfAbsent

        public T computeIfAbsent​(String name,
                                 BiFunction<LoggerGroup,​String,​T> supplier)
        Gets the logger with the specified name. If it is not already in this group, create it using the provided supplier.
        Parameters:
        name - the name
        supplier - the supplier
        Returns:
        the logger
      • computeIfAbsent

        public T computeIfAbsent​(String name)
        Gets the logger with the specified name.If it is not already in this group, create it using the default supplier.
        Parameters:
        name - the name
        Returns:
        the logger
      • putIfAbsent

        public void putIfAbsent​(String name,
                                T logger)
        Put the logger in the group if it isn't already known.
        Parameters:
        name - the name
        logger - the logger