Class IPAddressNetwork<T extends IPAddress, R extends IPAddressSection, E extends IPAddressSection, S extends IPAddressSegment, J extends InetAddress>
java.lang.Object
inet.ipaddr.AddressNetwork<S>
inet.ipaddr.IPAddressNetwork<T,R,E,S,J>
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
IPv4AddressNetwork, IPv6AddressNetwork
public abstract class IPAddressNetwork<T extends IPAddress, R extends IPAddressSection, E extends IPAddressSection, S extends IPAddressSegment, J extends InetAddress>
extends AddressNetwork<S>
Represents a network of addresses of a single IP version providing a collection of standard addresses components for that version, such as masks and loopbacks.
- Author:
- sfoley
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classChoose a map of your choice to implement a cache of addresses and/or host names.static classChoose a map of your choice to implement a cache of host names and resolved addresses.static classIPAddressNetwork.IPAddressCreator<T extends IPAddress, R extends IPAddressSection, E extends IPAddressSection, S extends IPAddressSegment, J extends InetAddress>static classA factory of address strings or host names, which can be particularly useful if you are using your own network, or if you are using your own validation options.static classChoose a map of your choice to implement a cache of address strings and their associated addresses.Nested classes/interfaces inherited from class AddressNetwork
AddressNetwork.AddressSegmentCreator<S>, AddressNetwork.HostIdentifierStringGenerator<T>, AddressNetwork.PrefixConfiguration -
Method Summary
Modifier and TypeMethodDescriptionvoidgetHostMask(int networkPrefixLength) getHostMaskSection(int networkPrefixLength) abstract IPAddress.IPVersiongetNetworkAddress(int networkPrefixLength) The network address is the subnet of all address with the same network mask.getNetworkMask(int networkPrefixLength) The tne network mask is a single address with zeros corresponding to the host section of the address.getNetworkMask(int networkPrefixLength, boolean withPrefixLength) getNetworkMaskSection(int networkPrefixLength) static StringgetPrefixString(int networkPrefixLength) intgetSegmentHostMask(int segmentPrefixLength) intgetSegmentNetworkMask(int segmentPrefixLength) String[]booleanisIPv4()booleanisIPv6()Methods inherited from class AddressNetwork
getDefaultPrefixConfiguration, getPrefixConfiguration, setSegmentCaching
-
Method Details
-
clearCaches
public void clearCaches()- Overrides:
clearCachesin classAddressNetwork<S extends IPAddressSegment>
-
isIPv4
public boolean isIPv4() -
isIPv6
public boolean isIPv6() -
getIPVersion
-
getAddressCreator
- Specified by:
getAddressCreatorin classAddressNetwork<S extends IPAddressSegment>
-
getLoopback
-
getStandardLoopbackStrings
-
getSegmentNetworkMask
public int getSegmentNetworkMask(int segmentPrefixLength) -
getSegmentHostMask
public int getSegmentHostMask(int segmentPrefixLength) -
getNetworkMask
The tne network mask is a single address with zeros corresponding to the host section of the address. It may or may not include the prefix length of the network.- Parameters:
networkPrefixLength-- Returns:
-
getNetworkAddress
The network address is the subnet of all address with the same network mask. For example, 1.2.0.0/16 is a network address when it includes all addresses 1.2.*.*, rather than just being the single address, the mask 1.2.0.0- Parameters:
networkPrefixLength-- Returns:
-
getNetworkMask
-
getNetworkMaskSection
-
getHostMask
-
getHostMaskSection
-
getPrefixString
-