Class LogText

java.lang.Object
net.orbyfied.j8.util.logging.LogText

public class LogText extends Object
  • Constructor Details

    • LogText

      public LogText()
  • Method Details

    • formatted

      public static LogText.Stringable formatted(String unformatted, String formatted)
    • getMapped

      public HashMap<String,Object> getMapped()
    • getLinear

      public ArrayList<Object> getLinear()
    • lockNewline

      public LogText lockNewline()
      Lock the new line value.
      Returns:
      This.
    • newLine

      public LogText newLine(boolean b)
      Set if a newline is enabled.
      Parameters:
      b - Boolean.
      Returns:
      This.
    • newLine

      public boolean newLine()
      Get if a newline is enabled.
      Returns:
      True/false.
    • put

      public LogText put(Object val)
      Put a new component at the end.
      Parameters:
      val - The value.
      Returns:
      This.
    • put

      public LogText put(String key, Object val)
      Put a new component at the end.
      Parameters:
      key - The key.
      val - The value.
      Returns:
      This.
    • put

      public LogText put(String key, int idx, Object val)
      Put a new component at the specified index.
      Parameters:
      key - The key.
      idx - The index.
      val - The value.
      Returns:
      This.
    • sub

      public LogText sub(String key)
      Create a new log text object, add it as a component under the specified key and return it.
      Parameters:
      key - The key to put it under.
      Returns:
      The text object.
    • sub

      public LogText sub(String key, int idx)
      Create a new log text object, add it as a component under the specified key and at the specified index and return it.
      Parameters:
      key - The key to put it under.
      idx - The index.
      Returns:
      The text object.
    • get

      public <T> T get(String key)
    • use

      public <T> LogText use(String key, Consumer<T> consumer)
    • getOrCreate

      public <T> T getOrCreate(String key, Function<String,T> function)
    • useOrCreate

      public <T> LogText useOrCreate(String key, Function<String,T> constructor, Consumer<T> consumer)
    • toString

      public String toString(boolean format)
    • toString

      public String toString()
      Overrides:
      toString in class Object