common
Class Utilities

java.lang.Object
  extended bycommon.Utilities

public class Utilities
extends java.lang.Object

Collection of utility methods for the GLTMon project.

Version:
0.1
Author:
gswalters

Constructor Summary
Utilities()
           
 
Method Summary
static boolean isLargerIP(java.lang.String firstIP, java.lang.String secondIP)
          Determine if the first IP address is larger or equal to the second IP address
static boolean isValidIP(java.lang.String ipAddress)
          Determines the validity of a an IP address.
static boolean isValidSubnet(java.lang.String ipAddress)
          Determines the validity of base IP address.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Utilities

public Utilities()
Method Detail

isValidIP

public static boolean isValidIP(java.lang.String ipAddress)
Determines the validity of a an IP address.

Form of the string is xxx.xxx.xxx.xxx

Valid IP address is:

Parameters:
ipAddress - the IP address to validate
Returns:
True if and only if the IP address is valid

isValidSubnet

public static boolean isValidSubnet(java.lang.String ipAddress)
Determines the validity of base IP address.

Form of the string is xxx.xxx.xxx

Valid IP subnet address is:


isLargerIP

public static boolean isLargerIP(java.lang.String firstIP,
                                 java.lang.String secondIP)
Determine if the first IP address is larger or equal to the second IP address

Parameters:
firstIP - String containing the first IP address
secondIP - String containing the second IP address
Returns:
true if first IP is larger or equal to the second IP address