Interface IpListParser

All Known Implementing Classes:
PatternBasedIpListParser, PlainIpListParser
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface IpListParser
Converts a single entry of an IP-address list into an IPAddress object.
See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    @NonNull Optional<inet.ipaddr.IPAddress>
    parse(@NonNull String listEntry)
    Converts the given plain-text entry (in some format) of an IP-address list into an IPAddress object.
  • Method Details

    • parse

      @NonNull @NonNull Optional<inet.ipaddr.IPAddress> parse(@NonNull @NonNull String listEntry) throws de.gustavblass.commons.exceptions.IllegalArgumentException
      Converts the given plain-text entry (in some format) of an IP-address list into an IPAddress object.
      Parameters:
      listEntry - The string representation of the IP address, in some format.
      Returns:
      The IP address if the entry could be parsed. Empty Optional if the entry is blank (however defined in the context of the format implemented by the parser).
      Throws:
      de.gustavblass.commons.exceptions.IllegalArgumentException - If the given entry is invalid.