java.lang.Object
inet.ipaddr.AddressNetwork<IPv4AddressSegment>
inet.ipaddr.IPAddressNetwork<IPv4Address,IPv4AddressSection,IPv4AddressSection,IPv4AddressSegment,Inet4Address>
inet.ipaddr.ipv4.IPv4AddressNetwork
- All Implemented Interfaces:
Serializable
public class IPv4AddressNetwork
extends IPAddressNetwork<IPv4Address,IPv4AddressSection,IPv4AddressSection,IPv4AddressSegment,Inet4Address>
Provides methods and types associated with all IPv4 addresses.
- Author:
- scfoley
- See Also:
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class inet.ipaddr.IPAddressNetwork
IPAddressNetwork.HostIDStringAddressGenerator<T extends HostIdentifierString>, IPAddressNetwork.HostNameGenerator, IPAddressNetwork.IPAddressCreator<T extends IPAddress,
R extends IPAddressSection, E extends IPAddressSection, S extends IPAddressSegment, J extends InetAddress>, IPAddressNetwork.IPAddressGenerator, IPAddressNetwork.IPAddressStringGenerator Nested classes/interfaces inherited from class inet.ipaddr.AddressNetwork
AddressNetwork.AddressSegmentCreator<S extends AddressSegment>, AddressNetwork.HostIdentifierStringGenerator<T extends HostIdentifierString>, AddressNetwork.PrefixConfiguration
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGets the default prefix configuration used by this network type and version.This method determines the prefix configuration in use by this network.boolean
isIPv4()
static void
Sets the default prefix configuration used by this network.Methods inherited from class inet.ipaddr.IPAddressNetwork
clearCaches, getHostMask, getHostMaskSection, getLoopback, getNetworkAddress, getNetworkMask, getNetworkMask, getNetworkMaskSection, getPrefixString, getSegmentHostMask, getSegmentNetworkMask, getStandardLoopbackStrings, isIPv6
Methods inherited from class inet.ipaddr.AddressNetwork
setSegmentCaching
-
Constructor Details
-
IPv4AddressNetwork
public IPv4AddressNetwork()
-
-
Method Details
-
getPrefixConfiguration
Description copied from class:AddressNetwork
This method determines the prefix configuration in use by this network.The prefix configuration determines whether a prefixed address like 1.2.0.0/16 results in a subnet block (ie 1.2.*.*) or just a single address (1.2.0.0) with a prefix length.
If you wish to change the default behaviour, you can either call
setDefaultPrefixConfiguration(PrefixConfiguration)
, orIPv6AddressNetwork.setDefaultPrefixConfiguration(PrefixConfiguration)
or you can override this method in your own network and use your own network for your addresses.- Specified by:
getPrefixConfiguration
in classAddressNetwork<IPv4AddressSegment>
- See Also:
-
setDefaultPrefixConfiguration
Sets the default prefix configuration used by this network.- See Also:
-
getDefaultPrefixConfiguration
Gets the default prefix configuration used by this network type and version.- See Also:
-
getAddressCreator
-
isIPv4
public boolean isIPv4()- Overrides:
isIPv4
in classIPAddressNetwork<IPv4Address,
IPv4AddressSection, IPv4AddressSection, IPv4AddressSegment, Inet4Address>
-
getIPVersion
- Specified by:
getIPVersion
in classIPAddressNetwork<IPv4Address,
IPv4AddressSection, IPv4AddressSection, IPv4AddressSegment, Inet4Address>
-