Interface FromStringParser<T>

Type Parameters:
T - type of the handled type to parse.
All Known Implementing Classes:
InstantParser, LongParser, TemporalParser, UuidParser

public interface FromStringParser<T>
Interface to parse a String in an expected syntax to a specific type.
Since:
1.0.0
  • Method Summary

    Modifier and Type
    Method
    Description
    parse(String string)
    Parses the given String to the type handled by this parser but efficiently returns null if the syntax does not match.
  • Method Details

    • parse

      T parse(String string)
      Parses the given String to the type handled by this parser but efficiently returns null if the syntax does not match. This allows to detect the format without wasting much performance.
      Parameters:
      string - the String to parse. May or may not be in the format expected for the type of this parser.
      Returns:
      the given String parsed to the type handled by this parser or null if the syntax does not match.