java.lang.Object
org.bytemechanics.config.manager.internal.commons.string.SimpleFormat

public final class SimpleFormat
extends java.lang.Object
Helper class for internal use only Please keep in mind that this class can be changed, renamed, deleted or extended without previous advice between fix releases, minor versions or major versions
Since:
0.0.1
Version:
1.0.1
Author:
Albert Farré Figueras
  • Constructor Summary

    Constructors 
    Constructor Description
    SimpleFormat()  
  • Method Summary

    Modifier and Type Method Description
    static java.lang.String format​(java.lang.String _message, java.lang.Object... _args)
    Formatter that replaces _message content '{}' by the giver _args per order.
    The method to print the object is by calling object to string and in case the object is null is replaced by the string "null"
    static java.util.function.Supplier<java.lang.String> supplier​(java.lang.String _message, java.lang.Object... _args)
    Supplier that retrieve the message formatted that replaces _message content '{}' by the giver _args per order.
    The method to print the object is by calling object to string and in case the object is null is replaced by the string "null"

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

  • Method Details

    • format

      public static final java.lang.String format​(java.lang.String _message, java.lang.Object... _args)
      Formatter that replaces _message content '{}' by the giver _args per order.
      The method to print the object is by calling object to string and in case the object is null is replaced by the string "null"
      Parameters:
      _message - Message to be replaced
      _args - Objects to us by replacement
      Returns:
      the _message with the '{}' replaced by the given args or "null"
      Since:
      0.0.1
    • supplier

      public static final java.util.function.Supplier<java.lang.String> supplier​(java.lang.String _message, java.lang.Object... _args)
      Supplier that retrieve the message formatted that replaces _message content '{}' by the giver _args per order.
      The method to print the object is by calling object to string and in case the object is null is replaced by the string "null"
      Parameters:
      _message - Message to be replaced
      _args - Objects to us by replacement
      Returns:
      a supplier that provides the _message with the '{}' replaced by the given args or "null"
      Since:
      1.1.0