public final class SpecTypes
extends java.lang.Object
SPEC-TYPES
element in ReqIF XML.
This is the collection of SPEC-TYPE
subclasses:-
<SPEC-TYPES>
<RELATION-GROUP-TYPE IDENTIFIER="..." LAST-CHANGE="..." />
<SPEC-OBJECT-TYPE IDENTIFIER="..." LAST-CHANGE="..." />
<SPEC-RELATION IDENTIFIER="..." LAST-CHANGE="..." />
<SPECIFICATION-TYPE IDENTIFIER="..." LAST-CHANGE="..." />
</SPEC-TYPES>
Modifier and Type | Method and Description |
---|---|
boolean |
contains(SpecType specType)
Checks whether the specified
SpecType exists in this collection. |
boolean |
containsIdentifiableWithLongName(java.lang.String longName)
Checks for existence of an
Identifiable in this collection with the specified longName . |
boolean |
containsKey(java.lang.String identifier)
Checks whether this collection contains the
Identifiable whose identfier matches that specified in the argument |
RelationGroupType |
createRelationGroupType(java.lang.String desc,
java.util.Date lastChange,
java.lang.String longName,
java.lang.String identifier,
java.lang.String alternativeID)
Constructs a new
RelationGroupType and adds it to this ReqIF. |
SpecificationType |
createSpecificationType(java.lang.String desc,
java.util.Date lastChange,
java.lang.String longName,
java.lang.String identifier,
java.lang.String alternativeID)
Constructs a new
SpecificationType and adds it to this ReqIF. |
SpecObjectType |
createSpecObjectType(java.lang.String desc,
java.util.Date lastChange,
java.lang.String longName,
java.lang.String identifier,
java.lang.String alternativeID)
Constructs a new
SpecObjectType and adds it to this ReqIF. |
SpecRelationType |
createSpecRelationType(java.lang.String desc,
java.util.Date lastChange,
java.lang.String longName,
java.lang.String identifier,
java.lang.String alternativeID)
Constructs a new
SpecRelationType and adds it to this ReqIF. |
SpecType |
find(java.lang.String longName)
Returns the first occurrence of a
SpecType object with the specified longName that is contained in this collection. |
SpecType |
get(int index)
Returns the
SpecType object at the specified index that is contained in this collection. |
SpecType |
get(java.lang.String identifier)
Returns the
SpecType object with the specified identifier that is contained in this collection. |
int |
getCount()
Returns the count of items in this collection.
|
java.util.Iterator<SpecType> |
iterator() |
void |
remove(SpecType specType)
Removes a
SpecType object from this collection. |
java.util.stream.Stream<SpecType> |
stream() |
java.lang.String |
toString() |
public java.util.stream.Stream<SpecType> stream()
public java.util.Iterator<SpecType> iterator()
iterator
in interface java.lang.Iterable<SpecType>
public SpecType get(int index) throws java.lang.IndexOutOfBoundsException
SpecType
object at the specified index that is contained in this collection.public SpecType get(java.lang.String identifier) throws UnknownIdentifierException
SpecType
object with the specified identifier that is contained in this collection.identifier
- the identifier of the collection member to returnSpecType
subclass with the specified identifierUnknownIdentifierException
- if the object identified by the Identifier parameter can't be foundpublic SpecType find(java.lang.String longName)
SpecType
object with the specified longName that is contained in this collection.longName
- the longName of the SpecType to return, not nullSpecType
subclass with the specified longName, can be nullpublic boolean contains(SpecType specType)
SpecType
exists in this collection.specType
- the SpecType
to check, not nulltrue
if the specified specType exists
, false
otherwisepublic void remove(SpecType specType) throws NotFoundException, ReferencedException
SpecType
object from this collection.specType
- the SpecType
object to remove, not nullNotFoundException
- if the specified specType
object is not in the collectionReferencedException
- if the specified specType
object is referenced in other SpecElementWithAttributes
objectspublic RelationGroupType createRelationGroupType(java.lang.String desc, java.util.Date lastChange, java.lang.String longName, java.lang.String identifier, java.lang.String alternativeID) throws DuplicateIdentifierException, InvalidIdentifierException
RelationGroupType
and adds it to this ReqIF.
Since LONG-NAME is optional it is permitted to create multiple SpecType
objects with the same LONG-NAME.
desc
- the value to be assigned to the DESC attribute, can be nulllastChange
- the date value to be assigned to the LAST-CHANGE attribute, can be null in which case 'now' is assignedlongName
- the value to be assigned to the LONG-NAME attribute, can be nullidentifier
- the identifier to assign to this object, can be null to auto-assignalternativeID
- the value to be assigned to the ALTERNATIVE-ID::IDENTIFIER attribute, can be nullRelationGroupType
, not nullDuplicateIdentifierException
- if the specified identifier is not uniqueInvalidIdentifierException
- if the specified identifier is not valid xsd:ID formatpublic SpecificationType createSpecificationType(java.lang.String desc, java.util.Date lastChange, java.lang.String longName, java.lang.String identifier, java.lang.String alternativeID) throws DuplicateIdentifierException, InvalidIdentifierException
SpecificationType
and adds it to this ReqIF.
Since LONG-NAME is optional it is permitted to create multiple SpecType
objects with the same LONG-NAME.
desc
- the value to be assigned to the DESC attribute, can be nulllastChange
- the date value to be assigned to the LAST-CHANGE attribute, can be null in which case 'now' is assignedlongName
- the value to be assigned to the LONG-NAME attribute, can be nullidentifier
- the identifier to assign to this object, can be null to auto-assignalternativeID
- the value to be assigned to the ALTERNATIVE-ID::IDENTIFIER attribute, can be nullSpecificationType
, not nullDuplicateIdentifierException
- if the specified identifier is not uniqueInvalidIdentifierException
- if the specified identifier is not valid xsd:ID formatpublic SpecObjectType createSpecObjectType(java.lang.String desc, java.util.Date lastChange, java.lang.String longName, java.lang.String identifier, java.lang.String alternativeID) throws DuplicateIdentifierException, InvalidIdentifierException
SpecObjectType
and adds it to this ReqIF.
Since LONG-NAME is optional it is permitted to create multiple SpecType
objects with the same LONG-NAME.
desc
- the value to be assigned to the DESC attribute, can be nulllastChange
- the date value to be assigned to the LAST-CHANGE attribute, can be null in which case 'now' is assignedlongName
- the value to be assigned to the LONG-NAME attribute, can be nullidentifier
- the identifier to assign to this object, can be null to auto-assignalternativeID
- the value to be assigned to the ALTERNATIVE-ID::IDENTIFIER attribute, can be nullSpecObjectType
, not nullDuplicateIdentifierException
- if the specified identifier is not uniqueInvalidIdentifierException
- if the specified identifier is not valid xsd:ID formatpublic SpecRelationType createSpecRelationType(java.lang.String desc, java.util.Date lastChange, java.lang.String longName, java.lang.String identifier, java.lang.String alternativeID) throws DuplicateIdentifierException, InvalidIdentifierException
SpecRelationType
and adds it to this ReqIF.
Since LONG-NAME is optional it is permitted to create multiple SpecType
objects with the same LONG-NAME.
desc
- the value to be assigned to the DESC attribute, can be nulllastChange
- the date value to be assigned to the LAST-CHANGE attribute, can be null in which case 'now' is assignedlongName
- the value to be assigned to the LONG-NAME attribute, can be nullidentifier
- the identifier to assign to this object, can be null to auto-assignalternativeID
- the value to be assigned to the ALTERNATIVE-ID::IDENTIFIER attribute, can be nullSpecRelationType
, not nullDuplicateIdentifierException
- if the specified identifier is not uniqueInvalidIdentifierException
- if the specified identifier is not valid xsd:ID formatpublic boolean containsKey(java.lang.String identifier)
Identifiable
whose identfier matches that specified in the argumentidentifier
- the identifier of the member to check for occurrence in the collection, not nullpublic boolean containsIdentifiableWithLongName(java.lang.String longName)
Identifiable
in this collection with the specified longName
.longName
- the value of longName
to check, nullable since longName
can be nullIdentifiable
with the specified longName
exists in this collection, otherwise falsepublic java.lang.String toString()
toString
in class java.lang.Object
public int getCount()