public abstract class IPAddressAttribute extends AttributeValue
To create an instance of an ipAddress from an encoded String or a DOM
Node you should use the getInstance
methods provided by
this class. To construct an ipAddress instance directly, you must use
the constructors provided by IPv4AddressAttribute
and
IPv6AddressAttribute
. These will both create an attribute
of XACML type ipAddress, but will handle the differences in these
two representations correctly.
Modifier and Type | Field and Description |
---|---|
static String |
identifier
Official name of this type
|
Modifier | Constructor and Description |
---|---|
protected |
IPAddressAttribute(InetAddress address,
InetAddress mask,
PortRange range)
Creates the new
IPAddressAttribute with all the optional
components. |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o)
Returns true if the input is an instance of this class and if its
value equals the value contained in this class.
|
InetAddress |
getAddress()
Returns the address represented by this object.
|
static IPAddressAttribute |
getInstance(Node root)
Returns a new
IPAddressAttribute that represents
the name at a particular DOM node. |
static IPAddressAttribute |
getInstance(String value)
Returns a new
IPAddressAttribute that represents
the name indicated by the String provided. |
InetAddress |
getMask()
Returns the mask represented by this object, or null if there is no
mask.
|
PortRange |
getRange()
Returns the port range represented by this object which will be
unbound if no range was specified.
|
int |
hashCode()
Returns the hashcode value used to index and compare this object with
others of the same type.
|
String |
toString()
Converts to a String representation.
|
encode, encode, encode, encodeWithTags, evaluate, evaluatesToBag, getChildren, getType, getValue, isBag, returnsBag
public static final String identifier
protected IPAddressAttribute(InetAddress address, InetAddress mask, PortRange range)
IPAddressAttribute
with all the optional
components.address
- a non-null InetAddress
mask
- an InetAddress
or null if there is no maskportRange
- a non-null PortRange
public static IPAddressAttribute getInstance(Node root) throws ParsingException
IPAddressAttribute
that represents
the name at a particular DOM node.root
- the Node
that contains the desired valueIPAddressAttribute
representing the
appropriate value (null if there is a parsing error)ParsingException
- if any of the address components is invalidpublic static IPAddressAttribute getInstance(String value) throws ParsingException
IPAddressAttribute
that represents
the name indicated by the String
provided.value
- a string representing the addressIPAddressAttribute
ParsingException
- if any of the address components is invalidpublic InetAddress getAddress()
public InetAddress getMask()
public PortRange getRange()
public boolean equals(Object o)
public int hashCode()
Copyright © 2023 JBoss by Red Hat. All rights reserved.