public final class SpecObjects
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
boolean |
contains(SpecObject specObject)
Checks whether the specified
SpecObject 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 |
SpecObject |
createSpecObject(SpecObjectType specObjectType,
java.lang.String desc,
java.util.Date lastChange,
java.lang.String longName,
java.lang.String identifier,
java.lang.String alternativeId)
Creates a
SpecObject |
SpecObject |
find(java.lang.String longName)
Returns the first occurrence of a
SpecObject object with the specified longName that is contained in this collection. |
SpecObject |
get(int index)
Returns the
SpecObject object at the specified index that is contained in this collection. |
SpecObject |
get(java.lang.String identifier)
Returns the
SpecObject object with the specified identifier that is contained in this collection. |
int |
getCount()
Returns the count of items in this collection.
|
java.util.Iterator<SpecObject> |
iterator() |
void |
remove(SpecObject specObject)
Removes a
SpecObject object from this collection. |
void |
removeAll()
Removes all
SpecObject objects from this collection. |
java.util.stream.Stream<SpecObject> |
stream() |
java.lang.String |
toString() |
public SpecObject createSpecObject(SpecObjectType specObjectType, java.lang.String desc, java.util.Date lastChange, java.lang.String longName, java.lang.String identifier, java.lang.String alternativeId) throws DuplicateIdentifierException, InvalidIdentifierException
SpecObjectspecObjectType - the SpecObjectType for this SpecObject, not nulldesc - the String value to sert for the description property, can be nulllastChange - the Date value to set for the lastChange property, set to null for 'now'longName - the String value to set for the longName property, can be nullidentifier - the String value to set for the identifier property (must confirm to xsd:ID),
set to null to autogeneratealternativeId - the String value to set for the alternativeId property, can be nullSpecObject, not nullDuplicateIdentifierException - if the specified identifier is already used in this ReqIF fileInvalidIdentifierException - if the specified identifier does not confrom to xsd:ID formatpublic java.util.stream.Stream<SpecObject> stream()
public java.util.Iterator<SpecObject> iterator()
iterator in interface java.lang.Iterable<SpecObject>public SpecObject get(int index) throws java.lang.IndexOutOfBoundsException
SpecObject object at the specified index that is contained in this collection.index - the index of the SpecObject to return from the collection, >= 0 and < collection sizeSpecObject object at the specified indexjava.lang.IndexOutOfBoundsException - if the index is < 0 or >= countpublic SpecObject get(java.lang.String identifier) throws UnknownIdentifierException
SpecObject object with the specified identifier that is contained in this collection.identifier - the identifier of the collection member to returnSpecObject subclass with the specified identifierUnknownIdentifierException - if the object identified by the Identifier parameter can't be foundpublic SpecObject find(java.lang.String longName)
SpecObject object with the specified longName that is contained in this collection.longName - the longName of the SpecObject to return, not nullSpecObject subclass with the specified longName, can be nullpublic boolean contains(SpecObject specObject)
SpecObject exists in this collection.specObject - the SpecObject to check, not nulltrue if the specified specObject exists, false otherwisepublic void remove(SpecObject specObject) throws NotFoundException, ReferencedException
SpecObject object from this collection.specObject - the SpecObject object to remove, not nullNotFoundException - if the specified SpecObject object is not in the collectionReferencedException - if the specified SpecObject object is referenced in one or more SpecRelation or SpecHierarchy objectspublic void removeAll()
throws ReferencedException
SpecObject objects from this collection.ReferencedException - if the specified SpecObject object is referenced in one or more SpecRelation or SpecHierarchy objectspublic 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.Objectpublic int getCount()