public interface Connection
Modifier and Type | Method and Description |
---|---|
boolean |
containsObjects(java.util.Collection<?> objects)
Return true if all objects given as parameter are contained in the
connection.
|
boolean |
containsObjects(java.lang.Object... objects)
Return true if all objects given as parameter are contained in the
connection.
|
ConnectionID |
getID()
Return the ID of the connection.
|
java.lang.String |
getLabel()
Return the label of the connection
|
MultiSet<java.lang.Object> |
getObjects()
Return all objects contained in this connection, without their labels.
|
<T> T |
getObjectWithRole(java.lang.String role)
Return the object with the given role in this connection The type of the
returned object is T.
|
java.util.Set<java.lang.String> |
getRoles()
Return the roles of all objects in this connection
|
boolean |
isRemoved()
Return true if one of the objects connected by this connection no longer
exists, i.e.
|
void |
remove()
Removes the connection.
|
void |
setLabel(java.lang.String name)
sets the label of the connection to the new name
|
void |
setManager(ConnectionManager manager)
Sets the manager for the connection.
|
void |
updated()
This method should be called as soon as the connection is changed, for
example if the label changed, or if the contents of one of the connected
objects changes.
|
java.lang.String getLabel()
ConnectionID getID()
boolean containsObjects(java.lang.Object... objects)
objects
- the objects to check forboolean containsObjects(java.util.Collection<?> objects)
objects
- the objects as a collectionboolean isRemoved()
MultiSet<java.lang.Object> getObjects()
java.util.Set<java.lang.String> getRoles()
<T> T getObjectWithRole(java.lang.String role)
T
- The type of object that should be returned.role
- the role the returned object has to havevoid remove()
void setLabel(java.lang.String name)
name
- void updated()
void setManager(ConnectionManager manager)
manager
-