public class IPv4AddressNetwork extends IPAddressNetwork<IPv4Address,IPv4AddressSection,IPv4AddressSection,IPv4AddressSegment,java.net.Inet4Address>
Modifier and Type | Class and Description |
---|---|
class |
IPv4AddressNetwork.IPv4AddressCreator |
IPAddressNetwork.HostIDStringAddressGenerator<T extends HostIdentifierString>, IPAddressNetwork.HostNameGenerator, IPAddressNetwork.IPAddressCreator, IPAddressNetwork.IPAddressGenerator, IPAddressNetwork.IPAddressStringGenerator
AddressNetwork.AddressSegmentCreator<S extends AddressSegment>, AddressNetwork.HostIdentifierStringGenerator<T extends HostIdentifierString>, AddressNetwork.PrefixConfiguration
Constructor and Description |
---|
IPv4AddressNetwork() |
Modifier and Type | Method and Description |
---|---|
IPv4AddressNetwork.IPv4AddressCreator |
getAddressCreator() |
static AddressNetwork.PrefixConfiguration |
getDefaultPrefixConfiguration()
Gets the default prefix configuration used by this network.
|
IPAddress.IPVersion |
getIPVersion() |
AddressNetwork.PrefixConfiguration |
getPrefixConfiguration()
This method determines the prefix configuration in use by this network.
|
boolean |
isIPv4() |
static void |
setDefaultPrefixConfiguration(AddressNetwork.PrefixConfiguration config)
Sets the default prefix configuration used by this network.
|
clearCaches, getHostMask, getHostMaskSection, getLoopback, getNetworkMask, getNetworkMask, getNetworkMaskSection, getPrefixString, getSegmentHostMask, getSegmentNetworkMask, getStandardLoopbackStrings, isIPv6
public AddressNetwork.PrefixConfiguration getPrefixConfiguration()
AddressNetwork
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 inet.ipaddr.ipv4.IPv4AddressNetwork#setDefaultPrefixConfiguration(PrefixConfiguration)
,
or inet.ipaddr.ipv6.IPv6AddressNetwork#setDefaultPrefixConfiguration(PrefixConfiguration)
or you can override this method in your own network and use your own network for your addresses.
getPrefixConfiguration
in class AddressNetwork<IPv4AddressSegment>
AddressNetwork.PrefixConfiguration
public static void setDefaultPrefixConfiguration(AddressNetwork.PrefixConfiguration config)
getPrefixConfiguration()
,
getDefaultPrefixConfiguration()
,
PrefixConfiguration
public static AddressNetwork.PrefixConfiguration getDefaultPrefixConfiguration()
AddressNetwork.getDefaultPrefixConfiguration()
,
PrefixConfiguration
public IPv4AddressNetwork.IPv4AddressCreator getAddressCreator()
getAddressCreator
in class IPAddressNetwork<IPv4Address,IPv4AddressSection,IPv4AddressSection,IPv4AddressSegment,java.net.Inet4Address>
public boolean isIPv4()
isIPv4
in class IPAddressNetwork<IPv4Address,IPv4AddressSection,IPv4AddressSection,IPv4AddressSegment,java.net.Inet4Address>
public IPAddress.IPVersion getIPVersion()
getIPVersion
in class IPAddressNetwork<IPv4Address,IPv4AddressSection,IPv4AddressSection,IPv4AddressSegment,java.net.Inet4Address>