public final class SpecRelationCollection
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
SpecRelation |
add(SpecRelation specRelation) |
boolean |
contains(T item)
Checks whether the specified item 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 |
T |
find(java.lang.String longName)
Returns the first occurrence of an
Identifiable object with the specified longName that is contained in this collection. |
T |
get(int index)
Returns the object at the specified index that is contained in this collection.
|
T |
get(java.lang.String identifier)
Returns the
Identifiable object with the specified identifier that is contained in this collection. |
int |
getCount()
Returns the count of items in this collection.
|
java.util.Iterator<T> |
iterator() |
java.util.stream.Stream<SpecRelation> |
stream() |
java.lang.String |
toString() |
public SpecRelation add(SpecRelation specRelation) throws UnknownIdentifierException
UnknownIdentifierException
public java.util.stream.Stream<SpecRelation> stream()
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 T find(java.lang.String longName)
Identifiable
object with the specified longName that is contained in this collection.longName
- the longName of the collection member to return, not nullIdentifiable
subclass with the specified longName, can be nullpublic T get(java.lang.String identifier) throws UnknownIdentifierException
Identifiable
object with the specified identifier that is contained in this collection.identifier
- the identifier of the collection member to returnIdentifiable
subclass with the specified identifierUnknownIdentifierException
- if the object identified by the Identifier parameter can't be foundpublic 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 java.util.Iterator<T> iterator()
iterator
in interface java.lang.Iterable<T>
public int getCount()
public boolean contains(T item)
item
- the item to checktrue
if the specified item exists, false
otherwisepublic T get(int index) throws java.lang.IndexOutOfBoundsException
index
- the index of the item in the collection, >= 0
and <
collection sizejava.lang.IndexOutOfBoundsException
- if the index is < 0
or >=
count