Class IPAddress
java.lang.Object
com.alibaba.druid.support.http.util.IPAddress
- All Implemented Interfaces:
Cloneable
- Version:
- 1.0
- Author:
- Marcel Dullaart
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanfinal intReturn the integer representation of the IP address.inthashCode()final booleanisClassA()Check if the IP address is belongs to a Class A IP address.final booleanisClassB()Check if the IP address is belongs to a Class B IP address.final booleanisClassC()Check if the IP address is belongs to a Class C IP address.toString()Return the string representation of the IP Address following the common decimal-dotted notation xxx.xxx.xxx.xxx.
-
Field Details
-
ipAddress
protected int ipAddressIP address
-
-
Constructor Details
-
IPAddress
-
IPAddress
public IPAddress(int address)
-
-
Method Details
-
getIPAddress
public final int getIPAddress()Return the integer representation of the IP address.- Returns:
- The IP address.
-
toString
Return the string representation of the IP Address following the common decimal-dotted notation xxx.xxx.xxx.xxx. -
isClassA
public final boolean isClassA()Check if the IP address is belongs to a Class A IP address.- Returns:
- Return
trueif the encapsulated IP address belongs to a class A IP address, otherwise returnefalse.
-
isClassB
public final boolean isClassB()Check if the IP address is belongs to a Class B IP address.- Returns:
- Return
trueif the encapsulated IP address belongs to a class B IP address, otherwise returnefalse.
-
isClassC
public final boolean isClassC()Check if the IP address is belongs to a Class C IP address.- Returns:
- Return
trueif the encapsulated IP address belongs to a class C IP address, otherwise returnefalse.
-
hashCode
public int hashCode() -
equals
-