Class StringFormatUtils

java.lang.Object
io.activej.common.StringFormatUtils

public final class StringFormatUtils extends Object
  • Constructor Details

    • StringFormatUtils

      public StringFormatUtils()
  • Method Details

    • formatMemSize

      public static String formatMemSize(MemSize memSize)
    • parseMemSize

      public static MemSize parseMemSize(String string)
    • formatDuration

      public static String formatDuration(Duration value)
    • parseDuration

      public static Duration parseDuration(String string)
    • formatPeriod

      public static String formatPeriod(Period value)
    • parsePeriod

      public static Period parsePeriod(String string)
      Parses value to Period. 1 year 2 months 3 days == Period.of(1, 2, 3) Every value can be negative, but you can't make all Period negative by negating year. In ISO format you can write -P1Y2M, which means -1 years -2 months in this format There can't be any spaces between '-' and DIGIT: -1 - Right - 2 - Wrong
    • formatLocalDateTime

      public static String formatLocalDateTime(LocalDateTime value)
    • parseLocalDateTime

      public static LocalDateTime parseLocalDateTime(String string)
    • formatInstant

      public static String formatInstant(Instant value)
    • parseInstant

      public static Instant parseInstant(String string)
    • parseInetSocketAddress

      public static InetSocketAddress parseInetSocketAddress(String addressAndPort) throws MalformedDataException
      Throws:
      MalformedDataException