T
- Parameterized associatee typepublic interface NamedAssociation<T> extends Iterable<String>, AbstractAssociation
Modifier and Type | Method and Description |
---|---|
boolean |
containsName(String name)
Checks if there is an association with the given name.
|
int |
count() |
T |
get(String name)
Retrieves a named association.
|
String |
nameOf(T entity)
Checks if the entity is present.
|
boolean |
put(String name,
T entity)
Adds a named assocation.
|
EntityReference |
referenceOf(String name)
Returns the EntityReference for the Association with the given name.
|
Iterable<EntityReference> |
references()
Returns an unmodifiable Iterable of the references to the associated entities.
|
boolean |
remove(String name)
Remove a named association.
|
Map<String,T> |
toMap() |
int count()
boolean containsName(String name)
name
- The name of the association we are checking if it exists.boolean put(String name, T entity)
name
- The name of the association.entity
- The entity for this named association.boolean remove(String name)
name
- The name of the association.T get(String name)
name
- The name of the association.String nameOf(T entity)
entity
- The entity to look for.Map<String,T> toMap()
Iterable<EntityReference> references()
EntityReference referenceOf(String name)
name
- The name of the association to return the EntityReference for