public final class AttributeValues
extends java.lang.Object
AttributeValue objects.
An instance of this class is contained in a SpecElementWithAttributes object.
| Modifier and Type | Method and Description |
|---|---|
void |
clear()
Removes all
AttributeValue objects from this AttributeValues collection. |
boolean |
contains(AttributeValue attributeValue)
Checks whether the specified
AttributeValue exists in this collection. |
AttributeValueBoolean |
createAttributeValue(AttributeDefinitionBoolean attributeDefinitionBoolean,
boolean theValue)
Creates and adds an
AttributeValueBoolean based on the specified AttributeDefinitionBoolean parameter and adds it to the collection of host which is either
an instance of a Specification, SpecObject or SpecRelation object. |
AttributeValueDate |
createAttributeValue(AttributeDefinitionDate attributeDefinitionDate,
java.util.Date dateValue)
Creates and adds an
AttributeValueDate based on the specified AttributeDefinitionDate parameter and adds it to the collection of host which is either
an instance of a Specification, SpecObject or SpecRelation object. |
AttributeValueEnumeration |
createAttributeValue(AttributeDefinitionEnumeration attributeDefinitionEnumeration,
EnumValue... theValues)
Creates and adds an
AttributeValueEnumeration based on the specified AttributeDefinitionEnumeration parameter and adds it to the collection of host which is either
an instance of a Specification, SpecObject or SpecRelation object. |
AttributeValueInteger |
createAttributeValue(AttributeDefinitionInteger attributeDefinitionInteger,
long theValue)
Creates and adds an
AttributeValueInteger based on the specified AttributeDefinitionInteger parameter and adds it to the collection of host which is either
an instance of a Specification, SpecObject or SpecRelation object. |
AttributeValueReal |
createAttributeValue(AttributeDefinitionReal attributeDefinitionReal,
double theValue)
Creates and adds an
AttributeValueReal based on the specified AttributeDefinitionReal parameter and adds it to the collection of host which is either
an instance of a Specification, SpecObject or SpecRelation object. |
AttributeValueString |
createAttributeValue(AttributeDefinitionString attributeDefinitionString,
java.lang.String theValue)
Creates and adds an
AttributeValueString based on the specified AttributeDefinitionString parameter and adds it to the collection of host which is either
an instance of a Specification, SpecObject or SpecRelation object. |
AttributeValueXHTML |
createAttributeValue(AttributeDefinitionXHTML attributeDefinitionXHTML,
org.w3c.dom.Element theValue)
Creates and adds an
AttributeValueXHTML based on the specified AttributeDefinitionXHTML parameter and adds it to the collection of host which is either
an instance of a Specification, SpecObject or SpecRelation object. |
AttributeValueXHTML |
createAttributeValue(AttributeDefinitionXHTML attributeDefinitionXHTML,
org.w3c.dom.Element theValue,
java.util.function.Consumer<ValidationMessage> validationMessageConsumer)
Creates and adds an
AttributeValueXHTML based on the specified AttributeDefinitionXHTML parameter and adds it to the collection of host which is either
an instance of a Specification, SpecObject or SpecRelation object (with validation). |
AttributeValueXHTML |
createAttributeValue(AttributeDefinitionXHTML attributeDefinitionXHTML,
org.w3c.dom.Element theValue,
org.w3c.dom.Element theOriginalValue,
boolean isSimplified)
Creates and adds an
AttributeValueXHTML based on the specified AttributeDefinitionXHTML parameter and adds it to the collection of host which is either
an instance of a Specification, SpecObject or SpecRelation object. |
AttributeValueXHTML |
createAttributeValue(AttributeDefinitionXHTML attributeDefinitionXHTML,
org.w3c.dom.Element theValue,
org.w3c.dom.Element theOriginalValue,
boolean isSimplified,
java.util.function.Consumer<ValidationMessage> validationMessageConsumer)
Creates and adds an
AttributeValueXHTML based on the specified AttributeDefinitionXHTML parameter and adds it to the collection of host which is either
an instance of a Specification, SpecObject or SpecRelation object (with validation). |
AttributeValue |
get(AttributeDefinition<?> attributeDefinition)
Returns the
AttributeValue associated with the specified AttributeDefinition. |
AttributeValue |
get(int index)
Returns the
AttributeValue object at the specified index that is contained in this collection. |
int |
getCount()
Returns the count of items in this collection.
|
java.util.Iterator<AttributeValue> |
iterator() |
void |
remove(AttributeValue attributeValue)
Removes the specified
AttributeValue from the AttributeValues collection |
java.util.stream.Stream<AttributeValue> |
stream() |
java.lang.String |
toString() |
public java.util.stream.Stream<AttributeValue> stream()
public java.util.Iterator<AttributeValue> iterator()
iterator in interface java.lang.Iterable<AttributeValue>public AttributeValue get(int index) throws java.lang.IndexOutOfBoundsException
AttributeValue object at the specified index that is contained in this collection.index - the index of the AttributeValue to return from the collection, >= 0 and < collection sizeAttributeValue object at the specified indexjava.lang.IndexOutOfBoundsException - if the index is < 0 or >= countpublic boolean contains(AttributeValue attributeValue)
AttributeValue exists in this collection.attributeValue - the AttributeValue to check, not nulltrue if the specified attributeValue exists, false otherwisepublic AttributeValueBoolean createAttributeValue(AttributeDefinitionBoolean attributeDefinitionBoolean, boolean theValue) throws AlreadyExistsException, NotFoundException
AttributeValueBoolean based on the specified AttributeDefinitionBoolean parameter and adds it to the collection of host which is either
an instance of a Specification, SpecObject or SpecRelation object.
The AttributeDefinitionBoolean parameter must be obtained from the SpecType subclass object
that is associated with this host object.
attributeDefinitionBoolean - the AttributeDefinitionBoolean object on which to base the value to create.
It must be obtained from the host's SpecType object. (Not null)theValue - the boolean value to setAttributeValueBoolean object, not nullNotFoundException - if the specified AttributeDefinitionBoolean object is not a
member of the host's SpecType objectAlreadyExistsException - if an attribute with the specified AttributeDefinitionBoolean has already
been added to this AttributeValues collectionpublic AttributeValueDate createAttributeValue(AttributeDefinitionDate attributeDefinitionDate, java.util.Date dateValue) throws NotFoundException, AlreadyExistsException
AttributeValueDate based on the specified AttributeDefinitionDate parameter and adds it to the collection of host which is either
an instance of a Specification, SpecObject or SpecRelation object.
The AttributeDefinitionDate parameter must be obtained from the SpecType subclass object
that is associated with this host object.
attributeDefinitionDate - the AttributeDefinitionDate object on which to base the value to create.
It must be obtained from the host's SpecType object. (Not null)dateValue - the Date value to set, not nullAttributeValueDate object, not nullNotFoundException - if the specified AttributeDefinitionDate object is not a
member of the host's SpecType object.AlreadyExistsException - if an attribute with the specified AttributeDefinitionDate has already
been added to this AttributeValues collectionpublic AttributeValueEnumeration createAttributeValue(AttributeDefinitionEnumeration attributeDefinitionEnumeration, EnumValue... theValues) throws InvalidValueException, NotFoundException, AlreadyExistsException
AttributeValueEnumeration based on the specified AttributeDefinitionEnumeration parameter and adds it to the collection of host which is either
an instance of a Specification, SpecObject or SpecRelation object.
The AttributeDefinitionEnumeration parameter must be obtained from the SpecType subclass object
that is associated with this host object.
attributeDefinitionEnumeration - the AttributeDefinitionEnumeration object on which to base the value to create.
It must be obtained from the host's SpecType object. (Not null)theValues - the EnumValue values to setAttributeValueEnumeration object, not nullNotFoundException - if the specified AttributeDefinitionEnumeration object is not a
member of the host's SpecType object.AlreadyExistsException - if an attribute with the specified AttributeDefinitionEnumeration has already
been added to this AttributeValues collectionInvalidValueException - if more enumValue objects are specified than are allowed by the AttributeDefinitionEnumerationpublic AttributeValueInteger createAttributeValue(AttributeDefinitionInteger attributeDefinitionInteger, long theValue) throws InvalidValueException, AlreadyExistsException, NotFoundException
AttributeValueInteger based on the specified AttributeDefinitionInteger parameter and adds it to the collection of host which is either
an instance of a Specification, SpecObject or SpecRelation object.
The AttributeDefinitionInteger parameter must be obtained from the SpecType subclass object
that is associated with this host object.
attributeDefinitionInteger - the AttributeDefinitionInteger object on which to base the value to create.
It must be obtained from the host's SpecType object. (Not null)theValue - the int value to setAttributeValueInteger object, not nullNotFoundException - if the specified AttributeDefinitionInteger object is not a
member of the host's SpecType object.AlreadyExistsException - if an attribute with the specified AttributeDefinitionInteger has already
been added to this AttributeValues collectionInvalidValueException - if the theValue value is outside the range permitted by the associated DatatypeDefinitionIntegerpublic AttributeValueReal createAttributeValue(AttributeDefinitionReal attributeDefinitionReal, double theValue) throws NotFoundException, InvalidValueException, AlreadyExistsException
AttributeValueReal based on the specified AttributeDefinitionReal parameter and adds it to the collection of host which is either
an instance of a Specification, SpecObject or SpecRelation object.
The AttributeDefinitionReal parameter must be obtained from the SpecType subclass object
that is associated with this host object.
attributeDefinitionReal - the AttributeDefinitionReal object on which to base the value to create.
It must be obtained from the host's SpecType object. (Not null)theValue - the double value to setAttributeValueReal object, not nullNotFoundException - if the specified AttributeDefinitionReal object is not a
member of the host's SpecType object.AlreadyExistsException - if an attribute with the specified AttributeDefinitionReal has already
been added to this AttributeValues collectionInvalidValueException - if the theValue value is outside the range permitted by the associated DatatypeDefinitionRealpublic AttributeValueString createAttributeValue(AttributeDefinitionString attributeDefinitionString, java.lang.String theValue) throws NotFoundException, InvalidValueException, AlreadyExistsException
AttributeValueString based on the specified AttributeDefinitionString parameter and adds it to the collection of host which is either
an instance of a Specification, SpecObject or SpecRelation object.
The AttributeDefinitionString parameter must be obtained from the SpecType subclass object
that is associated with this host object.
attributeDefinitionString - the AttributeDefinitionString object on which to base the value to create.
It must be obtained from the host's SpecType object. (Not null)theValue - the String value to setAttributeValueString object, not nullNotFoundException - if the specified AttributeDefinitionString object is not a
member of the host's SpecType object.AlreadyExistsException - if an attribute with the specified AttributeDefinitionString has already
been added to this AttributeValues collectionInvalidValueException - if the theValue string is longer than that permitted by the associated DatatypeDefinitionStringpublic AttributeValueXHTML createAttributeValue(AttributeDefinitionXHTML attributeDefinitionXHTML, org.w3c.dom.Element theValue, org.w3c.dom.Element theOriginalValue, boolean isSimplified, java.util.function.Consumer<ValidationMessage> validationMessageConsumer) throws NotFoundException, ValidationException, AlreadyExistsException
AttributeValueXHTML based on the specified AttributeDefinitionXHTML parameter and adds it to the collection of host which is either
an instance of a Specification, SpecObject or SpecRelation object (with validation).
The AttributeDefinitionXHTML parameter must be obtained from the SpecType subclass object
that is associated with this host object.
attributeDefinitionXHTML - the AttributeDefinitionXHTML object on which to base the value to create.
It must be obtained from the host's SpecType object. (Not null)theValue - the Element value to set as the theValue ReqIF XHTML content, not nulltheOriginalValue - the Element value to set as the theOriginalValue ReqIF XHTML content, can be nullisSimplified - true or false to set as the @IS-SIMPLIFIED attributevalidationMessageConsumer - a consumer of validation messages, not nullAttributeValueXHTML object, not nullNotFoundException - if the specified AttributeDefinitionXHTML object is not a
member of the host's SpecType object.AlreadyExistsException - if an attribute with the specified AttributeDefinitionXHTML has already
been added to this AttributeValues collectionValidationException - if either the theValue or theOriginalValue Element values do not conform to ReqIF XHTML standardspublic AttributeValueXHTML createAttributeValue(AttributeDefinitionXHTML attributeDefinitionXHTML, org.w3c.dom.Element theValue) throws NotFoundException, ValidationException, AlreadyExistsException
AttributeValueXHTML based on the specified AttributeDefinitionXHTML parameter and adds it to the collection of host which is either
an instance of a Specification, SpecObject or SpecRelation object.
The AttributeDefinitionXHTML parameter must be obtained from the SpecType subclass object
that is associated with this host object.
The THE-ORIGINAL-VALUE ReqIF XHTML content is unspecified.
The @IS-SIMPLIFIED attribute is set to false.
attributeDefinitionXHTML - the AttributeDefinitionXHTML object on which to base the value to create.
It must be obtained from the host's SpecType object. (Not null)theValue - the Element value to set as the theValue ReqIF XHTML content, not nullAttributeValueXHTML object, not nullNotFoundException - if the specified AttributeDefinitionXHTML object is not a
member of the host's SpecType object.AlreadyExistsException - if an attribute with the specified AttributeDefinitionXHTML has already
been added to this AttributeValues collectionValidationException - if either the theValue or theOriginalValue Element values do not conform to ReqIF XHTML standardspublic AttributeValueXHTML createAttributeValue(AttributeDefinitionXHTML attributeDefinitionXHTML, org.w3c.dom.Element theValue, java.util.function.Consumer<ValidationMessage> validationMessageConsumer) throws NotFoundException, ValidationException, AlreadyExistsException
AttributeValueXHTML based on the specified AttributeDefinitionXHTML parameter and adds it to the collection of host which is either
an instance of a Specification, SpecObject or SpecRelation object (with validation).
The AttributeDefinitionXHTML parameter must be obtained from the SpecType subclass object
that is associated with this host object.
The THE-ORIGINAL-VALUE ReqIF XHTML content is unspecified.
The @IS-SIMPLIFIED attribute is set to false.
attributeDefinitionXHTML - the AttributeDefinitionXHTML object on which to base the value to create.
It must be obtained from the host's SpecType object. (Not null)theValue - the Element value to set as the theValue ReqIF XHTML content, not nullvalidationMessageConsumer - a consumer of validation message objects ValidationMessage, not nullAttributeValueXHTML object, not nullNotFoundException - if the specified AttributeDefinitionXHTML object is not a
member of the host's SpecType object.AlreadyExistsException - if an attribute with the specified AttributeDefinitionXHTML has already
been added to this AttributeValues collectionValidationException - if either the theValue or theOriginalValue Element values do not conform to ReqIF XHTML standardspublic AttributeValueXHTML createAttributeValue(AttributeDefinitionXHTML attributeDefinitionXHTML, org.w3c.dom.Element theValue, org.w3c.dom.Element theOriginalValue, boolean isSimplified) throws NotFoundException, ValidationException, AlreadyExistsException
AttributeValueXHTML based on the specified AttributeDefinitionXHTML parameter and adds it to the collection of host which is either
an instance of a Specification, SpecObject or SpecRelation object.
The AttributeDefinitionXHTML parameter must be obtained from the SpecType subclass object
that is associated with this host object.
attributeDefinitionXHTML - the AttributeDefinitionXHTML object on which to base the value to create.
It must be obtained from the host's SpecType object. (Not null)theValue - the Element value to set as the theValue ReqIF XHTML content, not nulltheOriginalValue - the Element value to set as the theOriginalValue ReqIF XHTML content, can be nullisSimplified - true or false to set as the @IS-SIMPLIFIED attributeAttributeValueXHTML object, not nullNotFoundException - if the specified AttributeDefinitionXHTML object is not a
member of the host's SpecType object.AlreadyExistsException - if an attribute with the specified AttributeDefinitionXHTML has already
been added to this AttributeValues collectionValidationException - if either the theValue or theOriginalValue Element values do not conform to ReqIF XHTML standardspublic AttributeValue get(AttributeDefinition<?> attributeDefinition) throws NotFoundException
AttributeValue associated with the specified AttributeDefinition.attributeDefinition - the AttributeDefinition of the AttributeValue to returnAttributeValue associated with the specified AttributeDefinition, can be nullNotFoundException - if the attributeDefinition is not found in this object's SpecTypepublic void clear()
AttributeValue objects from this AttributeValues collection.public void remove(AttributeValue attributeValue) throws NotFoundException
AttributeValue from the AttributeValues collectionattributeValue - the AttributeValue to remove, not nullNotFoundException - if the specified AttributeValue was not foundpublic java.lang.String toString()
toString in class java.lang.Objectpublic int getCount()