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.
Converts a single entry of an IP-address list into an
IPAddress object.- See Also:
-
Method Summary
-
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 anIPAddressobject.- Parameters:
listEntry- The string representation of the IP address, in some format.- Returns:
- The IP address if the entry could be parsed. Empty
Optionalif 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.
-