IPPortCheckerRange.java
package com.ziesemer.utils.web.addressFilter.conditions;
/**
* @author Mark A. Ziesemer
* <a href="http://www.ziesemer.com."><www.ziesemer.com></a>
*/
public class IPPortCheckerRange implements IPortChecker{
protected final int beginPort;
protected final int endPort;
public IPPortCheckerRange(final int beginPort, final int endPort){
this.beginPort = beginPort;
this.endPort = endPort;
}
public boolean matches(final int port) throws Exception{
return port >= beginPort && port <= endPort;
}
public int getBeginPort(){
return beginPort;
}
public int getEndPort(){
return endPort;
}
}