|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object
|
+--com.cafesoft.cams.attr.AbstractAttributeValue
|
+--com.cafesoft.cams.attr.BagAttributeValue
BagAttributeValue represents a collection of return values from
Functions and AttributeDesignators. All values
in the bag are of the same attribute type, but the bag may also be empty.
NOTE: the bag is immutable, although its contents may not be.
| Constructor Summary | |
BagAttributeValue(URI type,
Collection bag)
Creates a new BagAttributeValue that represents a bag
of AttributeValues of a specific data type. |
|
| Method Summary | |
boolean |
contains(AttributeValue value)
Returns true if this set contains the specified value. |
boolean |
containsAll(BagAttributeValue bag)
Returns true if this bag contains all of the values of the specified bag. |
static BagAttributeValue |
createEmptyBag(URI type)
Convenience function that returns a bag with no elements |
String |
encode()
Returns the String encoding of the attribute value. |
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 the bag values. |
int |
size()
Returns the number of elements in this bag |
String |
toString()
Converts to a String representation. |
| Methods inherited from class com.cafesoft.cams.attr.AbstractAttributeValue |
evaluate, evaluatesToBag, getType |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public BagAttributeValue(URI type,
Collection bag)
BagAttributeValue that represents a bag
of AttributeValues of a specific data type.
type - the attribute type contained by this bag.bag - a collection of AttributeValue objects, all of the same type.| Method Detail |
public boolean isBag()
isBag in interface AttributeValueisBag in class AbstractAttributeValuepublic static BagAttributeValue createEmptyBag(URI type)
type - the types contained in the bag
public boolean isEmpty()
public int size()
public boolean contains(AttributeValue value)
AttributeValue has overridden the
equals method.
value - the value to look for
public boolean containsAll(BagAttributeValue bag)
AttributeValue type contained in the bag has overridden
the equals method.
bag - the bag to compare
public Iterator iterator()
public String toString()
toString in class Objectpublic String encode()
encode in interface AttributeValueencode in class AbstractAttributeValueString form of the value
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||