Class IPTable


  • public class IPTable
    extends Object
    A Spare v4 IPTable implementation that uses nested HashMaps to optimize IP address matching over ranges of IP addresses.
    Author:
    mdiggory at atmire.com
    • Constructor Detail

      • IPTable

        public IPTable()
    • Method Detail

      • contains

        public boolean contains​(String ip)
                         throws IPTable.IPFormatException
        Check whether a given address is contained in this netblock.
        Parameters:
        ip - the address to be tested
        Returns:
        true if ip is within this table's limits
        Throws:
        IPTable.IPFormatException - Exception Class to deal with IPFormat errors.
      • toSet

        public Set<String> toSet()
        Convert to a Set.
        Returns:
        this table's content as a Set