Class IpRangeSet
java.lang.Object
org.cloudburstmc.netty.util.nethernet.IpRangeSet
A set of addresses written as single hosts or CIDR ranges, such as
10.0.0.0/8 or
2001:db8::/32. An address with no prefix matches only itself.-
Method Summary
Modifier and TypeMethodDescriptionbooleancontains(InetAddress address) booleancontains(InetSocketAddress address) static IpRangeSetempty()booleanisEmpty()static IpRangeSetparse(Collection<String> entries) Parses the entries, logging and skipping any that are not an address or a range.union(IpRangeSet other)
-
Method Details
-
empty
-
parse
Parses the entries, logging and skipping any that are not an address or a range.- Parameters:
entries- Addresses or CIDR ranges- Returns:
- The parsed set
-
isEmpty
public boolean isEmpty() -
union
- Parameters:
other- The set to add- Returns:
- A set matching any address either set matches
-
contains
-
contains
-