public final class Children
extends java.lang.Object
SpecHierarchy
objects in either a Specification
object
or a parent SpecHierarchy
object.Modifier and Type | Method and Description |
---|---|
boolean |
contains(SpecHierarchy specHierarchy)
Checks whether the specified
SpecHierarchy 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 |
SpecHierarchy |
createSpecHierarchy(SpecObject specObject,
java.lang.String desc,
java.util.Date lastChange,
java.lang.String longName,
java.lang.String identifier,
java.lang.String alternativeID,
java.util.List<AttributeDefinition<?>> editableAtts,
boolean isEditable,
boolean isTableInternal)
Creates an instance of this class and adds it to the parent which is either a
Specification or another
SpecHierarchy object. |
SpecHierarchy |
find(java.lang.String longName)
Returns the first occurrence of a
SpecHierarchy object with the specified longName that is contained in this collection. |
SpecHierarchy |
get(int index)
Returns the
SpecHierarchy object at the specified index that is contained in this collection. |
SpecHierarchy |
get(java.lang.String identifier)
Returns the
SpecHierarchy object with the specified identifier that is contained in this collection. |
int |
getCount()
Returns the count of items in this collection.
|
java.util.Iterator<SpecHierarchy> |
iterator() |
void |
remove(SpecHierarchy specHierarchy)
Removes a
SpecHierarchy object from this collection. |
void |
removeAll()
Removes all child (@code SpecHierarchy} objects in this collection.
|
java.util.stream.Stream<SpecHierarchy> |
stream() |
java.lang.String |
toString() |
public SpecHierarchy find(java.lang.String longName)
SpecHierarchy
object with the specified longName that is contained in this collection.longName
- the longName of the SpecHierarchy to return, not nullSpecHierarchy
subclass with the specified longName, can be nullpublic SpecHierarchy createSpecHierarchy(SpecObject specObject, java.lang.String desc, java.util.Date lastChange, java.lang.String longName, java.lang.String identifier, java.lang.String alternativeID, java.util.List<AttributeDefinition<?>> editableAtts, boolean isEditable, boolean isTableInternal) throws InvalidValueException, InvalidIdentifierException, DuplicateIdentifierException
Specification
or another
SpecHierarchy
object.
An instance of a SpecObject
class is associated with each SpecHierarchy
. The same SpecObject
object can be associated with multiple SpecHierarchy
objects.
specObject
- the SpecObject
object to associate with this SpecHierarchy
object, not nulldesc
- the value to assign as the @DESC
attribute of this object, can be nulllastChange
- the value to assign as the @LAST-CHANGE
attribute of this object, not nulllongName
- the value to assign as the @LONG-NAME
attribute of this object, can be nullidentifier
- the value to assign as the @IDENTIFIER
attribute of this object, can be null to auto assignalternativeID
- the value to assign as the ALTERNATIVE-ID::@IDENTIFIER
attribute, can be null but not emptyeditableAtts
- the List
of AttributeDefinition
objects to specify which attribute values can be modified, can be nullisEditable
- the boolean
value to set for the @IS-EDITABLE
attribute of this objectisTableInternal
- the boolean
value to set for the @IS-TABLE-INTERNAL
attribute of this objectSpecHierarchy
instance, not nullInvalidValueException
- if SpecObject
or any element in the editableAtts
list is null or any member in the editableAtts
list is not an AttributeDefinition
associated with this SpecObject
SpecType
InvalidIdentifierException
- if the identifier
parameter is not a valid xsd:IDDuplicateIdentifierException
- if the identifier
parameter has already been used by another objectpublic java.util.stream.Stream<SpecHierarchy> stream()
public java.util.Iterator<SpecHierarchy> iterator()
iterator
in interface java.lang.Iterable<SpecHierarchy>
public SpecHierarchy get(int index) throws java.lang.IndexOutOfBoundsException
SpecHierarchy
object at the specified index that is contained in this collection.index
- the index of the SpecHierarchy
to return from the collection, >= 0
and <
collection sizeSpecHierarchy
object at the specified indexjava.lang.IndexOutOfBoundsException
- if the index is < 0
or >=
countpublic SpecHierarchy get(java.lang.String identifier) throws UnknownIdentifierException
SpecHierarchy
object with the specified identifier that is contained in this collection.identifier
- the identifier of the collection member to returnSpecHierarchy
subclass with the specified identifierUnknownIdentifierException
- if the object identified by the Identifier parameter can't be foundpublic boolean contains(SpecHierarchy specHierarchy)
SpecHierarchy
exists in this collection.specHierarchy
- the SpecHierarchy
to check, not nulltrue
if the specified specHierarchy exists
, false
otherwisepublic void remove(SpecHierarchy specHierarchy) throws NotFoundException
SpecHierarchy
object from this collection. Removing a SpecHierarchy
from
a collection is deep.specHierarchy
- the SpecHierarchy
object to remove, not nullNotFoundException
- if the specified SpecHierarchy
object is not in the collectionpublic void removeAll()
public 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()