org.gudy.azureus2.core3.ipfilter.impl
Class IpRangeImpl

java.lang.Object
  extended by org.gudy.azureus2.core3.ipfilter.impl.IpRangeImpl
All Implemented Interfaces:
IpRange

public class IpRangeImpl
extends Object
implements IpRange

Author:
Olivier

Constructor Summary
IpRangeImpl(String _description, int _startIp, int _endIp, boolean _sessionOnly)
           
IpRangeImpl(String _description, String _startIp, String _endIp, boolean _sessionOnly)
           
 
Method Summary
 void addMergedEntry(IpRange e2)
           
 void checkValid()
           
 int compareDescription(IpRange other)
           
 int compareEndIpTo(IpRange other)
           
 int compareStartIpTo(IpRange other)
           
 boolean getAddedToRangeList()
           
protected  Object getDescRef()
           
 String getDescription()
           
 String getEndIp()
           
 long getEndIpLong()
           
 boolean getMerged()
           
 long getMergedEndLong()
           
 IpRange[] getMergedEntries()
           
 String getStartIp()
           
 long getStartIpLong()
           
 boolean isInRange(String ipAddress)
           
 boolean isSessionOnly()
           
 boolean isValid()
           
 void resetMergeInfo()
           
protected  void setAddedToRangeList(boolean b)
           
protected  void setDescRef(Object descRef)
           
 void setDescription(String str)
           
 void setEndIp(String str)
           
 void setMerged()
           
 void setMergedEnd(long endIpLong)
           
 void setSessionOnly(boolean _sessionOnly)
           
 void setStartIp(String str)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

IpRangeImpl

public IpRangeImpl(String _description,
                   String _startIp,
                   String _endIp,
                   boolean _sessionOnly)

IpRangeImpl

public IpRangeImpl(String _description,
                   int _startIp,
                   int _endIp,
                   boolean _sessionOnly)
Method Detail

checkValid

public void checkValid()
Specified by:
checkValid in interface IpRange

isValid

public boolean isValid()
Specified by:
isValid in interface IpRange

isInRange

public boolean isInRange(String ipAddress)
Specified by:
isInRange in interface IpRange

getDescription

public String getDescription()
Specified by:
getDescription in interface IpRange

setDescription

public void setDescription(String str)
Specified by:
setDescription in interface IpRange

getStartIp

public String getStartIp()
Specified by:
getStartIp in interface IpRange

getStartIpLong

public long getStartIpLong()
Specified by:
getStartIpLong in interface IpRange
Returns:

setStartIp

public void setStartIp(String str)
Specified by:
setStartIp in interface IpRange

getEndIp

public String getEndIp()
Specified by:
getEndIp in interface IpRange

getEndIpLong

public long getEndIpLong()
Specified by:
getEndIpLong in interface IpRange
Returns:

setEndIp

public void setEndIp(String str)
Specified by:
setEndIp in interface IpRange

toString

public String toString()
Overrides:
toString in class Object

isSessionOnly

public boolean isSessionOnly()
Specified by:
isSessionOnly in interface IpRange

setSessionOnly

public void setSessionOnly(boolean _sessionOnly)
Specified by:
setSessionOnly in interface IpRange

compareStartIpTo

public int compareStartIpTo(IpRange other)
Specified by:
compareStartIpTo in interface IpRange

compareEndIpTo

public int compareEndIpTo(IpRange other)
Specified by:
compareEndIpTo in interface IpRange

setAddedToRangeList

protected void setAddedToRangeList(boolean b)

getAddedToRangeList

public boolean getAddedToRangeList()
Specified by:
getAddedToRangeList in interface IpRange
Returns:

compareDescription

public int compareDescription(IpRange other)
Specified by:
compareDescription in interface IpRange

getDescRef

protected Object getDescRef()

setDescRef

protected void setDescRef(Object descRef)

getMergedEndLong

public long getMergedEndLong()
Specified by:
getMergedEndLong in interface IpRange
Returns:

getMergedEntries

public IpRange[] getMergedEntries()
Specified by:
getMergedEntries in interface IpRange
Returns:

resetMergeInfo

public void resetMergeInfo()
Specified by:
resetMergeInfo in interface IpRange

getMerged

public boolean getMerged()
Specified by:
getMerged in interface IpRange
Returns:

setMerged

public void setMerged()
Specified by:
setMerged in interface IpRange

setMergedEnd

public void setMergedEnd(long endIpLong)
Specified by:
setMergedEnd in interface IpRange

addMergedEntry

public void addMergedEntry(IpRange e2)
Specified by:
addMergedEntry in interface IpRange