public class BagAttribute extends AttributeValue
NOTE: This is the one standard attribute type that can't be created from the factory, since you can't have this in an XML block (it is used only in return values & dynamic inputs). I think this is right, but we may need to add some functionality to let this go into the factory.
| Constructor and Description |
|---|
BagAttribute(URI type,
List<AttributeValue> bag)
Creates a new
BagAttribute that represents the Collection of
AttributeValues supplied. |
| Modifier and Type | Method and Description |
|---|---|
boolean |
contains(AttributeValue value)
Returns true if this set contains the specified value.
|
boolean |
containsAll(BagAttribute bag)
Returns true if this bag contains all of the values of the specified bag.
|
static BagAttribute |
createEmptyBag(URI type)
Convenience function that returns a bag with no elements
|
String |
encode()
Because a bag cannot be included in a request/response or a policy, this will always throw an
UnsupportedOperationException. |
boolean |
isBag()
Overrides the default method to always return true.
|
boolean |
isEmpty()
A convenience function that returns whether or not the bag is empty (ie, whether or not the
size of the bag is zero)
|
Iterator |
iterator()
Returns an iterator over te
|
int |
size()
Returns the number of elements in this bag
|
encode, encodeWithTags, evaluate, evaluatesToBag, getChildren, getType, returnsBagpublic BagAttribute(URI type, List<AttributeValue> bag)
BagAttribute that represents the Collection of
AttributeValues supplied. If the set is null or empty, then the new bag is
empty.type - the data type of all the attributes in the setbag - a List of AttributeValuespublic boolean isBag()
isBag in class AttributeValuepublic static BagAttribute createEmptyBag(URI type)
type - the types contained in the bagpublic boolean isEmpty()
public int size()
public boolean contains(AttributeValue value)
AttributeValue has overridden the
equals method.value - the value to look forpublic boolean containsAll(BagAttribute bag)
AttributeValue type contained in the bag has
overridden the equals method.bag - the bag to comparepublic Iterator iterator()
public String encode()
UnsupportedOperationException.encode in class AttributeValueString form of the valueCopyright © 2024 WSO2. All rights reserved.