📄 iprangeimpl.java
字号:
// Decompiled by Jad v1.5.8e2. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://kpdus.tripod.com/jad.html
// Decompiler options: packimports(3) fieldsfirst ansi space
// Source File Name: IPRangeImpl.java
package org.gudy.azureus2.pluginsimpl.local.ipfilter;
import org.gudy.azureus2.core3.ipfilter.IpRange;
import org.gudy.azureus2.plugins.ipfilter.IPFilter;
import org.gudy.azureus2.plugins.ipfilter.IPRange;
public class IPRangeImpl
implements IPRange
{
private IPFilter filter;
private IpRange range;
protected IPRangeImpl(IPFilter _filter, IpRange _range)
{
filter = _filter;
range = _range;
}
protected IpRange getRange()
{
return range;
}
public String getDescription()
{
return range.getDescription();
}
public void setDescription(String str)
{
range.setDescription(str);
}
public boolean isValid()
{
return range.isValid();
}
public void checkValid()
{
range.checkValid();
}
public boolean isSessionOnly()
{
return range.isSessionOnly();
}
public String getStartIP()
{
return range.getStartIp();
}
public void setStartIP(String str)
{
range.setStartIp(str);
}
public String getEndIP()
{
return range.getEndIp();
}
public void setEndIP(String str)
{
range.setEndIp(str);
}
public void setSessionOnly(boolean sessionOnly)
{
range.setSessionOnly(sessionOnly);
}
public boolean isInRange(String ipAddress)
{
return range.isInRange(ipAddress);
}
public void delete()
{
filter.removeRange(this);
}
public boolean equals(Object other)
{
if (!(other instanceof IPRangeImpl))
return false;
else
return compareTo(other) == 0;
}
public int compareTo(Object other)
{
if (!(other instanceof IPRangeImpl))
throw new RuntimeException("other object must be IPRange");
IPRangeImpl o = (IPRangeImpl)other;
String ip1 = getStartIP();
String ip2 = o.getStartIP();
int res = ip1.compareTo(ip2);
if (res != 0)
return res;
ip1 = getEndIP();
ip2 = o.getEndIP();
if (ip1 == null && ip2 == null)
return 0;
if (ip1 == null)
return -1;
if (ip2 == null)
return 1;
else
return ip1.compareTo(ip2);
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -