public final class Specifications
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
boolean |
contains(Specification specification)
Checks whether the specified
Specification 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 |
Specification |
createSpecification(SpecificationType specificationType,
java.lang.String desc,
java.util.Date lastChange,
java.lang.String longName,
java.lang.String identifier,
java.lang.String alternativeId)
Creates a new
Specification object |
Specification |
find(java.lang.String longName)
Returns the first occurrence of a
Specification object with the specified longName that is contained in this collection. |
Specification |
get(int index)
Returns the
Specification object at the specified index that is contained in this collection. |
Specification |
get(java.lang.String identifier)
Returns the
Specification object with the specified identifier that is contained in this collection. |
int |
getCount()
Returns the count of items in this collection.
|
java.util.Iterator<Specification> |
iterator() |
void |
remove(Specification specification)
Removes a
Specification object from this collection. |
void |
removeAll()
Removes all
Specification objects from this collection. |
java.util.stream.Stream<Specification> |
stream() |
java.lang.String |
toString() |
public java.util.stream.Stream<Specification> stream()
public java.util.Iterator<Specification> iterator()
iterator
in interface java.lang.Iterable<Specification>
public Specification get(int index) throws java.lang.IndexOutOfBoundsException
Specification
object at the specified index that is contained in this collection.index
- the index of the Specification
to return from the collection, >= 0
and <
collection sizeSpecification
object at the specified indexjava.lang.IndexOutOfBoundsException
- if the index is < 0
or >=
countpublic Specification get(java.lang.String identifier) throws UnknownIdentifierException
Specification
object with the specified identifier that is contained in this collection.identifier
- the identifier of the collection member to returnSpecification
subclass with the specified identifierUnknownIdentifierException
- if the object identified by the Identifier parameter can't be foundpublic Specification find(java.lang.String longName)
Specification
object with the specified longName that is contained in this collection.longName
- the longName of the Specification to return, not nullSpecification
subclass with the specified longName, can be nullpublic boolean contains(Specification specification)
Specification
exists in this collection.specification
- the Specification
to check, not nulltrue
if the specified specification exists
, false
otherwisepublic void remove(Specification specification) throws NotFoundException, ReferencedException
Specification
object from this collection. This method will also remove child SpecHierarchy
objects.specification
- the Specification
object to remove, not nullNotFoundException
- if the specified Specification
object is not in the collectionReferencedException
- if the specified Specification
object is referenced in other RelationGroup
objectspublic void removeAll() throws ReferencedException
Specification
objects from this collection.ReferencedException
- if one or more Specification
objects in the collection
is referenced in one or more RelationGroup
objectspublic Specification createSpecification(SpecificationType specificationType, java.lang.String desc, java.util.Date lastChange, java.lang.String longName, java.lang.String identifier, java.lang.String alternativeId) throws DuplicateIdentifierException, InvalidIdentifierException
Specification
objectspecificationType
- the SpecificationType
for this specification, 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 nullSpecification
, not nullDuplicateIdentifierException
- if the specified identifier is already used in this ReqIF fileInvalidIdentifierException
- if the specified identifier does not confrom to 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()