|
JBoss port of sunxacml 2.0.8.Final-redhat-1 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jboss.security.xacml.sunxacml.attr.AttributeValue
org.jboss.security.xacml.sunxacml.attr.YearMonthDurationAttribute
public class YearMonthDurationAttribute
Representation of an xf:yearMonthDuration value. This class supports parsing
xd:yearMonthDuration values. All objects of this class are immutable and
thread-safe. The Date
objects returned are not, but
these objects are cloned before being returned.
Field Summary | |
---|---|
static String |
identifier
Official name of this type |
Constructor Summary | |
---|---|
YearMonthDurationAttribute(boolean negative,
long years,
long months)
Creates a new YearMonthDurationAttribute that represents
the duration supplied. |
Method Summary | |
---|---|
String |
encode()
Encodes the value in a form suitable for including in XML data like a request or an obligation. |
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 YearMonthDurationAttribute |
getInstance(Node root)
Returns a new YearMonthDurationAttribute that represents
the xf:yearMonthDuration at a particular DOM node. |
static YearMonthDurationAttribute |
getInstance(String value)
Returns a new YearMonthDurationAttribute that represents
the xf:yearMonthDuration value indicated by the string provided. |
long |
getMonths()
Gets the number of months. |
Object |
getValue()
Get the value represented |
long |
getYears()
Gets the number of years. |
int |
hashCode()
Returns the hashcode value used to index and compare this object with others of the same type. |
boolean |
isNegative()
Returns true if the duration is negative. |
String |
toString()
Converts to a String representation. |
Methods inherited from class org.jboss.security.xacml.sunxacml.attr.AttributeValue |
---|
encode, encode, encodeWithTags, evaluate, evaluatesToBag, getChildren, getType, isBag, returnsBag |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final String identifier
Constructor Detail |
---|
public YearMonthDurationAttribute(boolean negative, long years, long months) throws IllegalArgumentException
YearMonthDurationAttribute
that represents
the duration supplied.
negative
- true if the duration is negative, false otherwiseyears
- the number of years in the duration (must be positive)months
- the number of months in the duration (must be positive)
IllegalArgumentException
- if the total number of months
exceeds Long.MAX_LONG or the number
of months or years is negativeMethod Detail |
---|
public static YearMonthDurationAttribute getInstance(Node root) throws ParsingException
YearMonthDurationAttribute
that represents
the xf:yearMonthDuration at a particular DOM node.
root
- the Node
that contains the desired value
YearMonthDurationAttribute
representing the
appropriate value
ParsingException
- if any problems occurred while parsingpublic static YearMonthDurationAttribute getInstance(String value) throws ParsingException
YearMonthDurationAttribute
that represents
the xf:yearMonthDuration value indicated by the string provided.
value
- a string representing the desired value
YearMonthDurationAttribute
representing the
desired value
ParsingException
- if any problems occurred while parsingpublic boolean isNegative()
public long getYears()
public long getMonths()
public boolean equals(Object o)
equals
in class Object
o
- the object to compare
public int hashCode()
hashCode
in class Object
public String toString()
toString
in class Object
public String encode()
encode
in class AttributeValue
String
form of the valuepublic Object getValue()
AttributeValue
getValue
in class AttributeValue
|
JBoss port of sunxacml 2.0.8.Final-redhat-1 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |