com.indexdata.utils
Class IpRangeSet
java.lang.Object
com.indexdata.utils.IpRangeSet
public class IpRangeSet
- extends Object
Utility class to test if one IP range set can be considered the superset
of another.
A given set -- IP range set A -- is considered to 'enclose' another
set -- IP range set B -- if all possible IP numbers in set B is a subset of
all possible IP numbers in set A (note).
A IP range set is a space separated list of one or more IP ranges and/or
single IP numbers.
An IP range is a hyphen separated list of two IP numbers.
Note: Is not guaranteed to handle IP ranges that are split in two with
the end-point of one being back-to-back with the start-point of the next.
- Author:
- Niels Erik Nielsen
IpRangeSet
public IpRangeSet(String ipRanges)
iterator
public Iterator<IpRangeSet.IpRange> iterator()
encloses
public boolean encloses(IpRangeSet anotherIpRangeSet)
- Determines if a given IP range set is the subset of this
IP range set.
- Parameters:
anotherIpRangeSet
-
- Returns:
toString
public String toString()
- Overrides:
toString
in class Object
Copyright © 2012. All Rights Reserved.