ELEMENT - the type of the elements contained in this container.public abstract class ReferenceableContainer<ELEMENT extends Referenceable> extends LinkedHashSet<ELEMENT> implements CommonAttributes, HasDescription, Serializable
Referenceable elements.| Modifier and Type | Field and Description |
|---|---|
boolean |
getCreates |
| Constructor and Description |
|---|
ReferenceableContainer() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
add(ELEMENT e) |
boolean |
addAll(Collection<? extends ELEMENT> elementsCollection) |
boolean |
contains(String id)
Returns
true if this container has an element with the specified id |
abstract Class<ELEMENT> |
elementClass() |
ELEMENT |
get(String id) |
ELEMENT |
get(String id,
boolean create)
Returns the existing element stored in the container with the specified id, or if there is no such element,
creates it if
create is true, otherwise returns null. |
Description |
getDescription() |
ArrayList<String> |
getIDs()
Returns the ids of the elements in the container.
|
ArrayList<String> |
getNames()
Returns the names of the elements in the container.
|
String |
id() |
boolean |
isVoid() |
Iterator<ELEMENT> |
iterator() |
String |
mcdaConcept() |
void |
merge(ELEMENT element)
Adds the specified element to the container if there is no element with the same id, or merges the specified
element into the existing one.
|
String |
name() |
boolean |
remove(Object o) |
boolean |
removeAll(Collection<?> collection) |
void |
setDescription(Description description) |
void |
setId(String id) |
void |
setMcdaConcept(String mcdaConcept) |
void |
setName(String name) |
spliteratorequals, hashCodecontainsAll, retainAll, toArray, toArray, toStringfinalize, getClass, notify, notifyAll, wait, wait, waitclear, contains, containsAll, equals, hashCode, isEmpty, retainAll, size, toArray, toArrayparallelStream, removeIf, streampublic ELEMENT get(String id, boolean create)
create is true, otherwise returns null.id - the id of the element to be searched in the containercreate - determines whether an element with the specified id should be created and returned if it does not
already exist.create is
false.public ArrayList<String> getIDs()
public ArrayList<String> getNames()
public boolean contains(String id)
true if this container has an element with the specified idid - the id of the element to search within the containertrue if this container has an element with the specified idpublic void merge(ELEMENT element)
element - the element whose content should be put within the container.Referenceable.merge(Referenceable)public boolean isVoid()
public boolean add(ELEMENT e)
add in interface Collection<ELEMENT extends Referenceable>add in interface Set<ELEMENT extends Referenceable>add in class HashSet<ELEMENT extends Referenceable>public boolean addAll(Collection<? extends ELEMENT> elementsCollection)
addAll in interface Collection<ELEMENT extends Referenceable>addAll in interface Set<ELEMENT extends Referenceable>addAll in class AbstractCollection<ELEMENT extends Referenceable>public Iterator<ELEMENT> iterator()
iterator in interface Iterable<ELEMENT extends Referenceable>iterator in interface Collection<ELEMENT extends Referenceable>iterator in interface Set<ELEMENT extends Referenceable>iterator in class HashSet<ELEMENT extends Referenceable>public boolean remove(Object o)
remove in interface Collection<ELEMENT extends Referenceable>remove in interface Set<ELEMENT extends Referenceable>remove in class HashSet<ELEMENT extends Referenceable>public boolean removeAll(Collection<?> collection)
removeAll in interface Collection<ELEMENT extends Referenceable>removeAll in interface Set<ELEMENT extends Referenceable>removeAll in class AbstractSet<ELEMENT extends Referenceable>public String id()
id in interface CommonAttributespublic void setId(String id)
setId in interface CommonAttributespublic String name()
name in interface CommonAttributespublic String mcdaConcept()
mcdaConcept in interface CommonAttributespublic void setName(String name)
setName in interface CommonAttributespublic void setMcdaConcept(String mcdaConcept)
setMcdaConcept in interface CommonAttributespublic void setDescription(Description description)
setDescription in interface HasDescriptionpublic Description getDescription()
getDescription in interface HasDescriptionCopyright © 2013–2021 Sébastien Bigaret, Patrick Meyer. All rights reserved.