com.goldenhammer.nodecontroller
Class IPGenerator
java.lang.Object
com.goldenhammer.nodecontroller.IPGenerator
- public class IPGenerator
- extends java.lang.Object
This class is a helper class for the SimulationController. It's job is to
take input paramters (the ip generation mode, and the specific ip addresses)
and turn them into a collection of ip addresses
Method Summary |
static java.util.Collection |
generateIPs(java.lang.String startIP,
java.lang.String endIP)
this method takes the begining ip address and the last ip address and
fills the IP address in between |
static java.util.Collection |
tokenizeIPs(java.lang.String ipList)
takes a string which contains a list of ips or addresses separated by
spaces and tokenizes them to return a list of individual addresses |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
IPGenerator
public IPGenerator()
generateIPs
public static java.util.Collection generateIPs(java.lang.String startIP,
java.lang.String endIP)
throws java.security.InvalidParameterException
- this method takes the begining ip address and the last ip address and
fills the IP address in between
- Parameters:
startIP
- endIP
-
- Returns:
- all the ip's (inclusivly) in between startIP and endIP
- Throws:
java.security.InvalidParameterException
tokenizeIPs
public static java.util.Collection tokenizeIPs(java.lang.String ipList)
- takes a string which contains a list of ips or addresses separated by
spaces and tokenizes them to return a list of individual addresses
- Parameters:
ipList
- -
a list of IPs seperated by a single white space
- Returns:
- a list of individual addresses