org.cdlib.xtf.dynaXML
Class IpList.IpRange

Object
  extended by IpList.IpRange
Enclosing class:
IpList

private class IpList.IpRange
extends Object

Data structure to keep track of a range of IP addresses and whether they are "positive" or "negative". Provides a way to check if an IP address falls within the range.


Field Summary
 IpList.IpAddr endAddr
          End of the range (can be equal to startAddr)
 boolean isPositive
          true if the range is specified IP address to include, false if it specifies addresses to exclude.
 IpList.IpAddr startAddr
          Start of the range
 
Constructor Summary
IpList.IpRange(IpList.IpAddr _start, IpList.IpAddr _end, boolean _isPos)
          Construct an IP range.
 
Method Summary
(package private)  boolean matches(IpList.IpAddr addr)
          Checks if a specified IP address falls within the range.
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

startAddr

public IpList.IpAddr startAddr
Start of the range


endAddr

public IpList.IpAddr endAddr
End of the range (can be equal to startAddr)


isPositive

public boolean isPositive
true if the range is specified IP address to include, false if it specifies addresses to exclude.

Constructor Detail

IpList.IpRange

IpList.IpRange(IpList.IpAddr _start,
               IpList.IpAddr _end,
               boolean _isPos)
Construct an IP range.

Parameters:
_start - Starting address
_end - Ending address (can equal _start)
_isPos - true if range specified IPs to include, false to specify IPs to exclude.
Method Detail

matches

boolean matches(IpList.IpAddr addr)
Checks if a specified IP address falls within the range.