SunTM's XACML Implementation for JavaTM

com.sun.xacml.attr
Class BooleanAttribute

java.lang.Object
  extended bycom.sun.xacml.attr.AttributeValue
      extended bycom.sun.xacml.attr.BooleanAttribute
All Implemented Interfaces:
Evaluatable

public class BooleanAttribute
extends AttributeValue

Representation of an xs:boolean value. This class supports parsing xs:boolean values. All objects of this class are immutable and all methods of the class are thread-safe.

Since:
1.0

Field Summary
static String identifier
          Official name of this type
 
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 BooleanAttribute getFalseInstance()
          Returns a BooleanAttribute that represents a false value.
static BooleanAttribute getInstance(boolean value)
          Returns a BooleanAttribute that represents the boolean value provided.
static BooleanAttribute getInstance(Node root)
          Returns a BooleanAttribute that represents the xs:boolean at a particular DOM node.
static BooleanAttribute getInstance(String value)
          Returns a BooleanAttribute that represents the xs:boolean value indicated by the string provided.
static BooleanAttribute getTrueInstance()
          Returns a BooleanAttribute that represents a true value.
 boolean getValue()
          Returns the boolean value represented by this object.
 int hashCode()
          Returns the hashcode value used to index and compare this object with others of the same type.
 
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, toString, wait, wait, wait
 

Field Detail

identifier

public static final String identifier
Official name of this type

See Also:
Constant Field Values
Method Detail

getInstance

public static BooleanAttribute getInstance(Node root)
                                    throws ParsingException
Returns a BooleanAttribute that represents the xs:boolean at a particular DOM node.

Parameters:
root - the Node that contains the desired value
Returns:
a BooleanAttribute representing the appropriate value (null if there is a parsing error)
Throws:
ParsingException

getInstance

public static BooleanAttribute getInstance(String value)
                                    throws ParsingException
Returns a BooleanAttribute that represents the xs:boolean value indicated by the string provided.

Parameters:
value - a string representing the desired value
Returns:
a BooleanAttribute representing the appropriate value (null if there is a parsing error)
Throws:
ParsingException

getInstance

public static BooleanAttribute getInstance(boolean value)
Returns a BooleanAttribute that represents the boolean value provided.

Parameters:
value - a boolean representing the desired value
Returns:
a BooleanAttribute representing the appropriate value

getTrueInstance

public static BooleanAttribute getTrueInstance()
Returns a BooleanAttribute that represents a true value.

Returns:
a BooleanAttribute representing a true value

getFalseInstance

public static BooleanAttribute getFalseInstance()
Returns a BooleanAttribute that represents a false value.

Returns:
a BooleanAttribute representing a false value

getValue

public boolean getValue()
Returns the boolean value represented by this object.

Returns:
the boolean value

equals

public 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.

Parameters:
o - the object to compare
Returns:
true if this object and the input represent the same value

hashCode

public int hashCode()
Returns the hashcode value used to index and compare this object with others of the same type. Typically this is the hashcode of the backing data object.

Returns:
the object's hashcode value

encode

public String encode()
Description copied from class: AttributeValue
Encodes the value in a form suitable for including in XML data like a request or an obligation. This must return a value that could in turn be used by the factory to create a new instance with the same value.

Specified by:
encode in class AttributeValue
Returns:
a String form of the value

Sun's XACML Implementation Version 1.2

Copyright 2003-2004 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms.

Sun, Sun Microsystems, the Sun Logo, and Java are trademarks or registered trademarks of Sun Microsystems, Inc. in the US and other countries.