|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jboss.security.xacml.sunxacml.attr.PortRange
public class PortRange
This class represents a port range as specified in the XACML 2.0 description
of dnsName
and ipAddress
. The range may have
upper and lower bounds, be specified by a single port number, or may be
unbound.
Field Summary | |
---|---|
static int |
UNBOUND
Constant used to specify that the range is unbound on one side. |
Constructor Summary | |
---|---|
PortRange()
Default constructor used to represent an unbound range. |
|
PortRange(int singlePort)
Creates a PortRange that represents a single port value
instead of a range of values. |
|
PortRange(int lowerBound,
int upperBound)
Creates a PortRange with upper and lower bounds. |
Method Summary | |
---|---|
String |
encode()
|
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. |
static PortRange |
getInstance(String value)
Creates an instance of PortRange based on the given value. |
int |
getLowerBound()
Returns the lower-bound port value. |
int |
getUpperBound()
Returns the upper-bound port value. |
boolean |
isLowerBounded()
Returns whether the range is bounded by a lower port number. |
boolean |
isSinglePort()
Returns whether the range is actually a single port number. |
boolean |
isUnbound()
Returns whether the range is unbound, which means that it specifies no port number or range. |
boolean |
isUpperBounded()
Returns whether the range is bounded by an upper port number. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int UNBOUND
Constructor Detail |
---|
public PortRange()
public PortRange(int singlePort)
PortRange
that represents a single port value
instead of a range of values.
singlePort
- the single port numberpublic PortRange(int lowerBound, int upperBound)
PortRange
with upper and lower bounds. Either
of the parameters may have the value UNBOUND
meaning
that there is no bound at the respective end.
lowerBound
- the lower-bound port number or UNBOUND
upperBound
- the upper-bound port number or UNBOUND
Method Detail |
---|
public static PortRange getInstance(String value)
PortRange
based on the given value.
value
- a String
representing the range
PortRange
NumberFormatException
- if a port value isn't an integerpublic int getLowerBound()
UNBOUND
. If the range is actually a
single port number, then this returns the same value as
getUpperBound
.
public int getUpperBound()
UNBOUND
. If the range is actually a
single port number, then this returns the same value as
getLowerBound
.
public boolean isLowerBounded()
public boolean isUpperBounded()
public boolean isSinglePort()
public boolean isUnbound()
public boolean equals(Object o)
equals
in class Object
o
- the object to compare
public String encode()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |