|
SunTM's XACML Implementation for JavaTM | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sun.xacml.attr.AttributeValue
com.sun.xacml.attr.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. |
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 com.sun.xacml.attr.AttributeValue |
encode, encode, encodeWithTags, evaluate, evaluatesToBag, getChildren, getType, isBag |
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)
o
- the object to compare
public int hashCode()
public String toString()
public String encode()
encode
in class AttributeValue
String
form of the value
|
Sun's XACML Implementation Version 1.2 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Sun, Sun Microsystems, the Sun Logo, and Java are trademarks or registered trademarks of Sun Microsystems, Inc. in the US and other countries.